Beispiel #1
0
 public void setUpCamera()
 {
     GameObject[] cameraFollowObjects = new GameObject[m_tanks.Length];
     for (int i = 0; i < m_tanks.Length; i++)
     {
         cameraFollowObjects[i] = m_tanks[i].m_instance;
     }
     // Camera set up to follow the current player
     camera = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <CameraFollow>();
     camera.SetUpCamera(cameraFollowObjects);
     camera.ChangePlayer(counter);
 }
Beispiel #2
0
 IEnumerator PlayGame()
 {
     while (!OneTankLeft())
     {
         m_tanks[counter].startTurn();
         if (m_tanks[counter].turnFinished())
         {
             m_tanks[counter].wait();
             counter = (counter + 1) % numPlayers;
             camera.ChangePlayer(counter);
         }
         yield return(null);
     }
 }