Esempio n. 1
0
 public void gameStart()
 {
     player.GetComponent <Rigidbody> ().constraints = RigidbodyConstraints.None;
     for (int i = 0; i < 19; i++)
     {
         if (diamonds [i] != null)
         {
             Destroy(diamonds[i]);
         }
     }
     board.clear();
     monsters.Clear();
     manager.destroy();
     for (int i = 0; i < 10; i++)
     {
         GameObject monster = factory.getPatrol(i / 2);
         monsters.Add(monster);
         manager.beginPatrol(monster);
     }
     player.transform.position         = new Vector3(50, 0, 50);
     player.transform.localEulerAngles = new Vector3(0, 180, 0);
     reloadBlueDiamonds();
     reloadVioletDiamonds();
 }
Esempio n. 2
0
 // Use this for initialization
 void Start()
 {
     director        = Director.getInstance();
     factory         = Singleton <PatrolFactory> .Instance;
     board           = Singleton <ScoreBoard> .Instance;
     director.scence = this;
     manager         = gameObject.AddComponent <PatrolActionManager>() as PatrolActionManager;
     gameObject.GetComponent <PatrolActionManager> ().player = player;
     for (int i = 0; i < 10; i++)
     {
         GameObject monster = factory.getPatrol(i / 2);
         monsters.Add(monster);
         manager.beginPatrol(monster);
     }
     getLocations(5);
     reloadSource();
 }