JumperFooterAIConditional.cs 575 B

123456789101112131415161718192021222324252627
  1. using System;
  2. using BehaviorDesigner.Runtime.Tasks;
  3. public class JumperFooterAIConditional
  4. {
  5. [TaskCategory("Enemy/JumperFooter")]
  6. [TaskDescription("判断抓取成功")]
  7. public class CatchJudge : Conditional
  8. {
  9. public override void OnAwake()
  10. {
  11. this._action = base.GetComponent<JumperFooterAction>();
  12. }
  13. public override TaskStatus OnUpdate()
  14. {
  15. if (!this._action.Atk2Result)
  16. {
  17. return TaskStatus.Failure;
  18. }
  19. this._action.Atk2Result = false;
  20. return TaskStatus.Success;
  21. }
  22. private JumperFooterAction _action;
  23. }
  24. }