示例#1
0
    private void EndGame()
    {
        _gameStarted = false;
        _objectPooler.HideByTag("Enemy");
        _objectPooler.HideByTag("Bullet");
        var enemiesKilled = _enemyController.GetEnemiesKilled();

        GameEnded?.Invoke(enemiesKilled);
    }
示例#2
0
    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);
    }