Esempio n. 1
0
    protected new void Start()
    {
        sceneController = Director.getInstance().currentSceneController as FirstSceneController;
        sceneController.patrolActionManager = this;
        player = sceneController.getPlayer();

        patrolAction = PatrolAction.getAction(new Vector3(Random.Range(-1, 1f), Random.Range(-1, 1f)), speed);
        catchAction  = CatchAction.getAction(player, speed);
    }
Esempio n. 2
0
 void setAction()      //调用PatrolAction中的函数实现patrol的移动
 {
     patrolAc = PatrolAction.getAction();
     patrolAc.setPatrolInfo(this);
     Singleton <CCActionManager> .Instance.RunAction(patrol, patrolAc, null);
 }
Esempio n. 3
0
 public void Patrol(GameObject patrol)
 {
     patrolAction = PatrolAction.getAction(new Vector3(Random.Range(-1, 1f), 0, Random.Range(-1, 1f)), speed);
     this.RunAction(patrol, patrolAction, this);
 }
Esempio n. 4
0
 void setAction()
 {
     patrolAc = PatrolAction.getAction();
     patrolAc.setChaserInfo(this);
     Singleton <CCActionManager> .Instance.RunAction(chaser, patrolAc, null);
 }