using System.Collections; using System.Collections.Generic; using UnityEngine; using KairoEngine.Core; namespace KairoEngine.CharacterSystem { public class ZombieMoveToPositionCommand : ICommand { CharacterController character; Vector3 targetPosition; int varient; public ZombieMoveToPositionCommand(CharacterController character, Vector3 targetPosition, int varient) { this.character = character; this.targetPosition = targetPosition; this.varient = varient; } public void Execute() { ZombieMoveToPositionAction action = new ZombieMoveToPositionAction(character, targetPosition, varient); ActionController actionController = character.GetComponent(); if(actionController.HasAction(action) == false) { actionController.AddAction(action); } else { actionController.ChangeAction(action); } } } }