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); }
void setAction() //调用PatrolAction中的函数实现patrol的移动 { patrolAc = PatrolAction.getAction(); patrolAc.setPatrolInfo(this); Singleton <CCActionManager> .Instance.RunAction(patrol, patrolAc, null); }
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); }
void setAction() { patrolAc = PatrolAction.getAction(); patrolAc.setChaserInfo(this); Singleton <CCActionManager> .Instance.RunAction(chaser, patrolAc, null); }