CharacterEquipWeaponTaskAction.cs 733 B

12345678910111213141516171819202122232425
  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. using KairoEngine.Inventory;
  8. namespace KairoEngine.CharacterSystem
  9. {
  10. [Category("KairoEngine")]
  11. public class CharacterEquipWeaponTaskAction : ActionTask
  12. {
  13. [BlackboardOnly, RequiredField] public BBParameter<CharacterController> character;
  14. [BlackboardOnly, RequiredField] public BBParameter<ItemRef> itemRef;
  15. protected override void OnExecute()
  16. {
  17. ICommand command = new EquipItemCommand(itemRef.value, character.value);
  18. CommandInvoker.AddCommand(command);
  19. EndAction(true);
  20. }
  21. }
  22. }