MagicWeaponMoveState.cs 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. using Core.State;
  2. using Core.Triiger;
  3. using Fort23.Core;
  4. using Fort23.UTool;
  5. using GameLogic.Combat.CombatTool;
  6. using OfficeOpenXml.FormulaParsing.Excel.Functions.Logical;
  7. using UnityEngine;
  8. namespace GameLogic.Combat.Hero.State
  9. {
  10. /// <summary>
  11. /// 再空中飞来飞去撞的时候
  12. /// </summary>
  13. public class MagicWeaponMoveState : CombatHeroStateBasic
  14. {
  15. public class MagicWeaponMoveStateData : CObject, IStateEnterData
  16. {
  17. public bool trigger;
  18. public float triggerTime;
  19. public override void ActiveObj()
  20. {
  21. }
  22. public override void DormancyObj()
  23. {
  24. }
  25. }
  26. private CombatMagicWeaponEntity myCombatMagicWeaponEntity;
  27. private float speed = 10;
  28. private IUnRegister OnTriggerEnterEvent;
  29. protected Vector3 _lastDir;
  30. protected bool _trigger;
  31. private float _triggerTime;
  32. public MagicWeaponMoveState(CombatHeroEntity combatHeroEntity) : base(combatHeroEntity)
  33. {
  34. myCombatMagicWeaponEntity = combatHeroEntity as CombatMagicWeaponEntity;
  35. }
  36. protected override void ProEnter()
  37. {
  38. }
  39. private void OnTriggerEnter(Collider collider,ITriggerEntity triggerEntity)
  40. {
  41. HeroEntityMono heroEntityMono = collider.GetComponent<HeroEntityMono>();
  42. if (heroEntityMono == null )
  43. {
  44. return;
  45. }
  46. if (!(myCombatMagicWeaponEntity.CombatAIBasic.CurrState is MagicWeaponMoveState))
  47. {
  48. return;
  49. }
  50. }
  51. protected void ActiveHero()
  52. {
  53. }
  54. protected override void ProExit()
  55. {
  56. OnTriggerEnterEvent.UnRegister();
  57. }
  58. public override bool IsUpdateLockTarget()
  59. {
  60. return false;
  61. }
  62. protected override void ProDispose()
  63. {
  64. }
  65. public string tag { get; }
  66. }
  67. }