예제 #1
0
 private void Start()
 {
     countdown = GetComponent <StartCountdown>();
     SetPlayers();
     SetLevel();
     StartCoroutine(countdown.GameCountdown());
 }
예제 #2
0
 public void Pause()
 {
     if (!PauseMenu.activeSelf)
     {
         PauseMenu.SetActive(true);
         Time.timeScale = 0;
         for (int i = 0; i < 4; i++)
         {
             Player[i].GetComponentInChildren <PlayerController>().enabled = false;
         }
     }
     else if (PauseMenu.activeSelf)
     {
         PauseMenu.SetActive(false);
         Time.timeScale = 1;
         for (int i = 0; i < 4; i++)
         {
             Player[i].GetComponentInChildren <PlayerController>().enabled = true;
         }
         StartCoroutine(countdown.GameCountdown());
     }
 }