private void EndGame() { _gameStarted = false; _objectPooler.HideByTag("Enemy"); _objectPooler.HideByTag("Bullet"); var enemiesKilled = _enemyController.GetEnemiesKilled(); GameEnded?.Invoke(enemiesKilled); }
public void SetTowers(List <Vector2> towerPositions) { _objectPooler.HideByTag("Tower"); var towers = _objectPooler.GetSeveral("Tower", towerPositions.Count); foreach (var tower in towers) { tower.GetComponent <Tower>().ShootBullet += ShootBullet; } TowersPrepared?.Invoke(towers, towerPositions); }