S30001.cs 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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 _currTime;
  14. private BetterList<ILifetCycleHitPoint> _currTrigger = new BetterList<ILifetCycleHitPoint>();
  15. protected TimeLineEventLogicGroupBasic loopGroupBasic;
  16. protected TimeLineEventLogicGroupBasic currMyLoopGroupBasic;
  17. protected bool _isUpdate;
  18. protected override void ProInitSkill()
  19. {
  20. _harm = 200;
  21. }
  22. // protected override ILifetCycleHitPoint[] ProGetTineLineTargetEntity(
  23. // TimeLineEventLogicBasic timeLineEventLogicBasic)
  24. // {
  25. // ILifetCycleHitPoint[] allHero = new ILifetCycleHitPoint[_enterAlertTarget.Count];
  26. // for (int i = 0; i < _enterAlertTarget.Count; i++)
  27. // {
  28. // allHero[i] = _enterAlertTarget[i].GetMainHotPoin<ILifetCycleHitPoint>();
  29. // }
  30. //
  31. // return allHero;
  32. // }
  33. protected override void ProUseSkill()
  34. {
  35. _finishTimeLineGroupName = "";
  36. currMyLoopGroupBasic= ActivationTimeLineData("sk1");
  37. _isUpdate = true;
  38. }
  39. protected override void ProBreakSkill()
  40. {
  41. Finish();
  42. }
  43. protected void Finish()
  44. {
  45. currMyLoopGroupBasic?.CloseLoopFx();
  46. _isUpdate = false;
  47. SpecialDotInfo specialDotInfo = CombatHeroEntity.GetMainHotPoin<ILifetCycleHitPoint>(true)
  48. .GetSpecialDotInfo("sk1_trigger");
  49. specialDotInfo.targetTran.gameObject.SetActive(false);
  50. }
  51. protected override void ProCombatUpdate(float time)
  52. {
  53. if (!_isUpdate)
  54. {
  55. return;
  56. }
  57. _currTime += time;
  58. if (_currTime > 1)
  59. {
  60. _currTime -= 1;
  61. long v = CombatCalculateTool.Instance.GetVlaueRatioForLong(CombatHeroEntity.CurrCombatHeroInfo.attack.Value,
  62. _harm);
  63. if (loopGroupBasic != null)
  64. {
  65. loopGroupBasic.CloseLoopFx();
  66. }
  67. // for (int i = 0; i < _currTrigger.Count; i++)
  68. // {
  69. // _currTrigger[i].IfLifeCycle.This<CombatHeroEntity>().H
  70. // }
  71. _currTrigger.Clear();
  72. // ILifetCycleHitPoint[] allHero = new ILifetCycleHitPoint[_enterAlertTarget.Count];
  73. for (int i = 0; i < _enterAlertTarget.Count; i++)
  74. {
  75. ILifetCycleHitPoint targetEntity= _enterAlertTarget[i].GetMainHotPoin<ILifetCycleHitPoint>();
  76. _currTrigger.Add(targetEntity);
  77. HarmReturnInfo harmReturnInfo = Harm(CombatHeroEntity, targetEntity as CombatHeroHitPoint,
  78. v, AttType.Skill, triggerData);
  79. }
  80. loopGroupBasic= ActivationTimeLineData("sk1_hit",_currTrigger);
  81. }
  82. }
  83. // protected override void ProDefaultTimeLineTrigger(string groupName, CombatHeroHitPoint targetEntity,
  84. // ITimelineFxLogic timelineFxLogic,
  85. // TriggerData triggerData)
  86. // {
  87. // long v = CombatCalculateTool.Instance.GetVlaueRatioForLong(CombatHeroEntity.CurrCombatHeroInfo.attack.Value,
  88. // _harm);
  89. // HarmReturnInfo harmReturnInfo = Harm(CombatHeroEntity, targetEntity,
  90. // v, AttType.Skill, triggerData);
  91. // }
  92. }
  93. }