示例#1
0
 public void attackPlayer(int index)
 {
     //状态设置为追踪
     state[index] = 1;
     run[index]   = PatrolRunAction.GetRunAction();
     //以跑步状态进行追踪
     this.RunAction(patrols[index].getGameObject(), run[index], this);
 }
示例#2
0
    public static PatrolRunAction GetRunAction()
    {
        PatrolRunAction run = CreateInstance <PatrolRunAction>();

        //追踪对象目标是玩家
        run.target = SSDirector.getInstance().currentSceneController.player.getPlayer().transform.position;
        return(run);
    }