IEnumerator SubSpawnLoop(ZombieConfig zc) { for (int i = 0; i < zc.count; i++) { SpawnZombie(zc.zombieType); yield return(new WaitForSeconds(zc.secondsBetweenSpawn)); } }
public ZombieFactory(ZombieConfig config, MapData mapData, ZombiePool zombiePool, ZombieAnimationQueue.Factory animationQueueFactory, ZombieCollection collection) { _animationQueueFactory = animationQueueFactory; _config = config; _mapData = mapData; _zombiePool = zombiePool; _collection = collection; _zombiesToSpawn = new Queue <Zombie>(); }
public ZombieManager(ZombieDiedSignal zombieDiedSignal, ZombiePool zombiePool, ZombieFactory goFactory, GameConfig gameConfig, StartNewWaveSignal startNewWave, WaveStartedSignal waveStarted, UpdateZombiesCountSignal onUpdateZombiesCountSignal, NightManager nightManager, WindowsManager windowsManager, ZombieConfig zombieConfig, TutorialManager tutorialManager, AnalyticsManager analyticsManager) : base("zombies.json") { _onZombieDiedSignal = zombieDiedSignal; _onStartNewWaveSignal = startNewWave; _onWaveStartedSignal = waveStarted; _onUpdateZombiesCountSignal = onUpdateZombiesCountSignal; _windowsManager = windowsManager; _tutorialManager = tutorialManager; _tutorialManager.ZombieManager = this; _analyticsManager = analyticsManager; _zombiePool = zombiePool; _GOfactory = goFactory; _gameConfig = gameConfig; _nightManager = nightManager; _zombieConfig = zombieConfig; _zombies = new List <Zombie>(); _zombieCountBeforeBoss = _gameConfig.waveSettings.startZombieCount; _currentZombieCount = _zombieCountBeforeBoss; _currentDecadeZombieCount = _gameConfig.waveSettings.startZombieCount; WaveNumber = _gameConfig.waveSettings.startWave; _currentMainZombieType = ZombieType.Basic; _otherMainTypes = new List <ZombieType>(); _otherMainTypes.Add(ZombieType.Acid); _otherMainTypes.Add(ZombieType.Fire); _otherMainTypes.Add(ZombieType.Armor); _otherMainTypes.Add(ZombieType.Electro); _otherAddTypes = new List <ZombieType>(); _hpPerZombie = new InfInt(); _currentDecadeStartHP = new InfInt(_gameConfig.waveSettings.firstWaveHP); _currentWaveHP = new InfInt(_currentDecadeStartHP); _tempBigNumber = new InfInt(); _tmpBigNumber = new InfInt(); _autoStartNewWave = false; _waveStarted = false; _timeTravelStartLock = false; _lastBossAlive = false; }