Exemplo n.º 1
0
 void InitGame()
 {
     data     = new int[GetComponent <ReadManager>().GetNbData()];
     readData = GetComponent <ReadManager> ().ReadFile();
     if (readData)
     {
         data = GetComponent <ReadManager> ().GetData();
         rows = data [0];
     }
     columns = (int)(Screen.width * rows / Screen.height);
     if (columns % 2 != 0)
     {
         columns++;
     }
     home.SetupHome(columns, rows);
     boardScript.SetupScene(columns, rows, data [1], readData);
     mainCamera.SetupCamera();
     time.SetupTime(data [8], data[9], readData);
     guard.SetupGuard(data [2], data [3], readData);
     wave.SetupWaves(data[6], data [7], data[10], readData);
     chest.SetupChest(data [4], data [5], readData);
     UI.SetupUI();
     sound.SetupSound();
     bar.SetupBar();
     wave.LaunchWaves();
     score.SetupScore();
 }