CancelActionsTaskAction.cs 817 B

123456789101112131415161718192021222324252627282930
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using NodeCanvas.Framework;
  5. using ParadoxNotion.Design;
  6. using KairoEngine.Core;
  7. namespace KairoEngine.CharacterSystem
  8. {
  9. [Category("KairoEngine")]
  10. public class CharacterCancelActionsTaskAction : ActionTask
  11. {
  12. [BlackboardOnly, RequiredField] public BBParameter<CharacterController> character;
  13. protected override string info
  14. {
  15. get { return "Cancel Actions"; }
  16. }
  17. protected override void OnExecute()
  18. {
  19. if(character.value == false) EndAction(false);
  20. ICommand cancelActionsCommand = new CancelAtionsCommand(character.value);
  21. CommandInvoker.AddCommand(cancelActionsCommand);
  22. EndAction(true);
  23. }
  24. }
  25. }