コード例 #1
0
 protected new void Start()
 {
     sceneController = (FirstSceneController)SSDirector.getInstance().currentSceneController;
     userAction      = UserAction.GetSSAction(5);
     sceneController.actionManager = this;
     pf = sceneController.pf;
     RunAction(sceneController.player, userAction, this);
     foreach (var i in sceneController.patrols)
     {
         float          x      = Random.Range(-3.0f, 3.0f);
         int            z      = Random.Range(0, 4);
         Vector3        target = new Vector3(z % 2 == 0 ? (z - 1) * 3 : x, 0, z % 2 != 0 ? (z - 2) * 3 : x);
         CCMoveToAction k      = CCMoveToAction.GetSSAction(target + i.transform.position, 100, i.transform.position);
         seq.Add(k);
         Quaternion rotation = Quaternion.LookRotation(target, Vector3.up);
         i.transform.rotation = rotation;
         RunAction(i, k, this);
     }
 }