Exemplo n.º 1
0
 public void Restart()
 {
     SetGameState(false);
     _grid.ClearUnits();
     _enemyGrid.ClearUnits();
     _enemyGrid.SpawnEnemies();
     _uiMethods.RefreshBalance();
     if (_uiMethods.gameUI.activeSelf == false)
     {
         _uiMethods.gameUI.SetActive(true);
     }
     _uiMethods.winScreen.SetActive(false);
     Projectile[] proj = FindObjectsOfType <Projectile>();
     for (var i = 0; i < proj.Length; i++)
     {
         Destroy(proj[i].gameObject);
     }
 }