Esempio n. 1
0
    public void Setup()
    {
        _networkPlayerInputs = new List <NetworkPlayerInput>();

        _energySpawner = new NetworkEnergySpawner();
        _energySpawner.SetEnergyLoader(new NetworkTestEnergyLoader());
        (_energySpawner as NetworkEnergySpawner).energyPrefab = energyPrefab;

        _spawnPointSpawner = new NetworkSpawnPointSpawner();
        _spawnPointSpawner.SetSpawnPointLoader(new NetworkTestSpawnPointLoader());
        (_spawnPointSpawner as NetworkSpawnPointSpawner).spawnPointPrefab = spawnPointPrefab;

        // Create NetworkOutput
        _networkPlayerOutputController = gameObject.AddComponent <NetworkPlayerOutputController>();

        // Create Game Manager
        _gameManager         = gameObject.AddComponent <GameManager>();
        _gameManager.enabled = false;

        // Create RoundManager
        _roundManager = new RoundManager(3);

        _gameManager.SetRoundManager(_roundManager);

        _currentPlayerId = 0;
    }
Esempio n. 2
0
    public void Reset()
    {
        _currentPlayerId = 0;

        _networkPlayerInputs.Clear();

        _spawnPointSpawner = null;
        _energySpawner     = null;

        Destroy(_gameManager);
        Destroy(_networkPlayerOutputController);
    }
Esempio n. 3
0
 public void Teardown()
 {
     _baseSpawnPointSpawner = null;
     _fakeSpawnPointLoader  = null;
 }
Esempio n. 4
0
 public void Setup()
 {
     _baseSpawnPointSpawner = new BaseSpawnPointSpawner();
     _fakeSpawnPointLoader  = new FakeSpawnPointLoader();
     _baseSpawnPointSpawner.SetSpawnPointLoader(_fakeSpawnPointLoader as ISpawnPointLoader);
 }