Exemplo n.º 1
0
 public void CheckEnd()
 {
     if (playerUnitManager.GetUnitList().Count == 0)
     {
         //Players lose
         //Stop Networking
         ChampNetManager.StopNetworkConnection();
         PersistentData.SetPlayerHasWon(true);
         PersistentData.SetIsEndScene(true);
         SceneManager.LoadScene("EndScene");
     }
     else if (enemyUnitManager.GetUnitList().Count == 0)
     {
         //Enemies lose
         //Stop networking
         ChampNetManager.StopNetworkConnection();
         PersistentData.SetPlayerHasWon(false);
         PersistentData.SetIsEndScene(true);
         SceneManager.LoadScene("EndScene");
     }
 }
Exemplo n.º 2
0
 private void OnApplicationQuit()
 {
     ChampNetManager.StopNetworkConnection();
 }