public void getGoal(GameObject gameobject) { currentAction.destory = true; currentAction = RunAction.GetRunAction(gameobject.transform, runSpeed, ani); this.runAction(this.gameObject, currentAction, this); }
public void FollowAction(GameObject gameobject) { currentAction.destroy = true; // 销毁当前动作 currentAction = RunAction.GetRunAction(gameobject.transform, runSpeed, ani); this.runAction(this.gameObject, currentAction, this); // 跑向目标方向 }
public void ChasePlayer(GameObject obj) { baseAction.destory = true; baseAction = RunAction.GetRunAction(obj.transform, runSpeed, animator); this.runAction(this.gameObject, baseAction, this); }