S140003.cs 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. using CombatLibrary.CombatLibrary.CombatCore.CustomizeTimeLogic.FxLogic;
  2. using Core.Utility;
  3. using Fort23.Core;
  4. using GameLogic.Combat.CombatTool;
  5. using GameLogic.Combat.Hero;
  6. using GameLogic.Combat.Hero.SubStatus;
  7. using UnityEngine;
  8. using UTool.CustomizeTimeLogic.FxLogic.TimeLineEventinterface;
  9. namespace GameLogic.Combat.Skill
  10. {
  11. /// <summary>
  12. /// 狼boss 第3个技能,跳跃攻击范围那的敌人
  13. /// </summary>
  14. public class S140003 : SkillBasic
  15. {
  16. private float _harm;
  17. private Parabola3DPath parabolaPath;
  18. protected float _currTime;
  19. protected float _addTime;
  20. protected override void ProInitSkillConfig()
  21. {
  22. _harm = SelfSkillConfig.effectValue[0];
  23. _addTime=1.0f/0.37f;
  24. }
  25. protected override void ProUseSkill()
  26. {
  27. ActivationTimeLineData("sk3");
  28. }
  29. protected override void ProDefaultTimeLineTrigger(string groupName, CombatHeroHitPoint targetEntity,
  30. ITimelineFxLogic timelineFxLogic,
  31. TriggerData triggerData)
  32. {
  33. _currTime = 0;
  34. parabolaPath = CObjectPool.Instance.Fetch<Parabola3DPath>();
  35. parabolaPath.addY += 3;
  36. Vector3 startPos = CombatHeroEntity.dotPos;
  37. Vector3 targetPos = startPos + CombatHeroEntity.faceDir * 4 ;
  38. parabolaPath.SetPos(startPos, targetPos);
  39. }
  40. protected override void ProSkillPlayFinish()
  41. {
  42. CObjectPool.Instance.Recycle(parabolaPath);
  43. parabolaPath = null;
  44. }
  45. protected override void ProCombatUpdate(float time)
  46. {
  47. if (parabolaPath != null)
  48. {
  49. _currTime += time*_addTime;
  50. Vector3 pos = parabolaPath.GetPositionAtTime(_currTime);
  51. CombatHeroEntity.combatHeroGameObject.SetPosition(pos);
  52. if (_currTime >= 1)
  53. {
  54. CObjectPool.Instance.Recycle(parabolaPath);
  55. parabolaPath = null;
  56. long v = CombatCalculateTool.Instance.GetVlaueRatioForLong(
  57. CombatHeroEntity.CurrCombatHeroInfo.attack.Value,
  58. _harm);
  59. for (int i = 0; i < _enterAlertTarget.Count; i++)
  60. {
  61. CombatHeroHitPoint combatHeroHitPoint = _enterAlertTarget[i].GetMainHotPoin<CombatHeroHitPoint>();
  62. HarmReturnInfo harmReturnInfo = Harm(CombatHeroEntity, combatHeroHitPoint,
  63. v, AttType.Skill, triggerData);
  64. RepelledStatusState repelledStatusState = new RepelledStatusState(_enterAlertTarget[i].faceDir*-1, 2, 10, null);
  65. _enterAlertTarget[i].CombatAIBasic.AddSubStatus(repelledStatusState);
  66. }
  67. }
  68. }
  69. }
  70. }
  71. }