using System.Collections; using System.Collections.Generic; using UnityEngine; using KairoEngine.Core; using KairoEngine.Inventory; namespace KairoEngine.CharacterSystem { public class CharacterReloadFirearmCommand : ICommand { CharacterController character; ItemFirearmRef firearmRef; public CharacterReloadFirearmCommand(CharacterController character, ItemFirearmRef firearmRef) { this.character = character; this.firearmRef = firearmRef; } public void Execute() { CharacterReloadFirearmAction action = new CharacterReloadFirearmAction(character, firearmRef); ActionController actionController = character.GetComponent(); if(actionController.HasAction(action) == false) { actionController.AddAction(action); } } } }