private static void SpawnNextItemFromList(object itemInWaveList, WaveGenerator waveGenerator) { if (IsItemCreep(itemInWaveList)) { if (waveGenerator.spawnPoint == default(Vector3D)) waveGenerator.level.SpawnCreep((CreepType)itemInWaveList); else new Creep((CreepType)itemInWaveList, waveGenerator.spawnPoint); creepCountForCurrentWave++; waveGenerator.waveList[0].CreepsAndGroupsList.RemoveAt(0); } else if (IsItemGroup(itemInWaveList)) { if (!waveGenerator.Contains<SpawnAllCreepsInGroup>()) waveGenerator.Start<SpawnAllCreepsInGroup>(); waveGenerator.Stop<WaveCreation>(); } }
private void UpdateCreepCountAndStopCurrentBehavior(WaveGenerator waveGenerator) { creepCountForCurrentWave += creepCount; creepsSpawnedFromCurrentGroup = 0; waveGenerator.Start<WaveCreation>(); waveGenerator.waveList[0].CreepsAndGroupsList.RemoveAt(0); waveGenerator.Stop<SpawnAllCreepsInGroup>(); }