123456789101112131415161718192021222324252627282930 |
- 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<ActionController>();
- if(actionController.HasAction(action) == false)
- {
- actionController.AddAction(action);
- }
- }
- }
- }
|