1234567891011121314151617181920212223242526272829 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using KairoEngine.Core;
- namespace KairoEngine.CharacterSystem
- {
- public class CharacterAimCommand : ICommand
- {
- CharacterController character;
- Transform target;
- public CharacterAimCommand(CharacterController character, Transform target)
- {
- this.character = character;
- this.target = target;
- }
- public void Execute()
- {
- CharacterAimAction action = new CharacterAimAction(character, target);
- ActionController actionController = character.GetComponent<ActionController>();
- if(actionController.HasAction(action) == false)
- {
- actionController.AddAction(action);
- }
- }
- }
- }
|