S30001.cs 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. using CombatLibrary.CombatLibrary.CombatCore.CustomizeTimeLogic.FxLogic;
  2. using GameLogic.Combat.CombatTool;
  3. using GameLogic.Combat.Hero;
  4. using UTool.CustomizeTimeLogic.FxLogic.TimeLineEventinterface;
  5. namespace GameLogic.Combat.Skill
  6. {
  7. /// <summary>
  8. /// 火烧
  9. /// </summary>
  10. public class S30001 : SkillBasic
  11. {
  12. protected float _harm;
  13. protected float _maxTime;
  14. protected float _currTime;
  15. private BetterList<ILifetCycleHitPoint> _currTrigger = new BetterList<ILifetCycleHitPoint>();
  16. protected TimeLineEventLogicGroupBasic loopGroupBasic;
  17. protected TimeLineEventLogicGroupBasic currMyLoopGroupBasic;
  18. protected bool _isUpdate;
  19. protected float _currAllTime;
  20. protected override void ProInitSkill()
  21. {
  22. _harm = 200;
  23. _maxTime = 3;
  24. }
  25. // protected override ILifetCycleHitPoint[] ProGetTineLineTargetEntity(
  26. // TimeLineEventLogicBasic timeLineEventLogicBasic)
  27. // {
  28. // ILifetCycleHitPoint[] allHero = new ILifetCycleHitPoint[_enterAlertTarget.Count];
  29. // for (int i = 0; i < _enterAlertTarget.Count; i++)
  30. // {
  31. // allHero[i] = _enterAlertTarget[i].GetMainHotPoin<ILifetCycleHitPoint>();
  32. // }
  33. //
  34. // return allHero;
  35. // }
  36. protected override void ProUseSkill()
  37. {
  38. _finishTimeLineGroupName = "-1";
  39. currMyLoopGroupBasic = ActivationTimeLineData("sk1");
  40. _isUpdate = true;
  41. _currTime = 0;
  42. _currAllTime = 0;
  43. }
  44. protected override void ProBreakSkill()
  45. {
  46. Finish();
  47. }
  48. protected void Finish()
  49. {
  50. currMyLoopGroupBasic?.BreakTimeLine();
  51. if (loopGroupBasic != null)
  52. {
  53. loopGroupBasic.BreakTimeLine();
  54. }
  55. loopGroupBasic = null;
  56. _isUpdate = false;
  57. SpecialDotInfo specialDotInfo = CombatHeroEntity.GetMainHotPoin<ILifetCycleHitPoint>(true)
  58. .GetSpecialDotInfo("sk1_trigger");
  59. specialDotInfo.targetTran.gameObject.SetActive(false);
  60. }
  61. protected override void ProSkillPlayFinish()
  62. {
  63. Finish();
  64. }
  65. protected override void ProCombatUpdate(float time)
  66. {
  67. if (!_isUpdate)
  68. {
  69. return;
  70. }
  71. _currTime += time;
  72. _currAllTime += time;
  73. if (_currTime > 1)
  74. {
  75. _currTime -= 1;
  76. long v = CombatCalculateTool.Instance.GetVlaueRatioForLong(
  77. CombatHeroEntity.CurrCombatHeroInfo.attack.Value,
  78. _harm);
  79. if (loopGroupBasic != null)
  80. {
  81. loopGroupBasic.BreakTimeLine();
  82. }
  83. // for (int i = 0; i < _currTrigger.Count; i++)
  84. // {
  85. // _currTrigger[i].IfLifeCycle.This<CombatHeroEntity>().H
  86. // }
  87. _currTrigger.Clear();
  88. // ILifetCycleHitPoint[] allHero = new ILifetCycleHitPoint[_enterAlertTarget.Count];
  89. for (int i = 0; i < _enterAlertTarget.Count; i++)
  90. {
  91. ILifetCycleHitPoint targetEntity = _enterAlertTarget[i].GetMainHotPoin<ILifetCycleHitPoint>();
  92. _currTrigger.Add(targetEntity);
  93. HarmReturnInfo harmReturnInfo = Harm(CombatHeroEntity, targetEntity as CombatHeroHitPoint,
  94. v, AttType.Skill, triggerData);
  95. }
  96. loopGroupBasic = ActivationTimeLineData("sk1_hit", _currTrigger);
  97. }
  98. if (_currAllTime > _maxTime)
  99. {
  100. SkillPlayFinish();
  101. }
  102. }
  103. // protected override void ProDefaultTimeLineTrigger(string groupName, CombatHeroHitPoint targetEntity,
  104. // ITimelineFxLogic timelineFxLogic,
  105. // TriggerData triggerData)
  106. // {
  107. // long v = CombatCalculateTool.Instance.GetVlaueRatioForLong(CombatHeroEntity.CurrCombatHeroInfo.attack.Value,
  108. // _harm);
  109. // HarmReturnInfo harmReturnInfo = Harm(CombatHeroEntity, targetEntity,
  110. // v, AttType.Skill, triggerData);
  111. // }
  112. }
  113. }