1234567891011121314151617181920212223242526272829 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using KairoEngine.Core;
- namespace KairoEngine.CharacterSystem
- {
- public class TurnCommand : ICommand
- {
- CharacterController character;
- Vector3 point;
- public TurnCommand(CharacterController character, Vector3 point)
- {
- this.character = character;
- this.point = point;
- }
- public void Execute()
- {
- CharacterTurnToPointAction action = new CharacterTurnToPointAction(character, point);
- ActionController actionController = character.GetComponent<ActionController>();
- if(!actionController.HasAction(action))
- {
- actionController.AddAction(action);
- }
- }
- }
- }
|