Esempio n. 1
0
			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>();
				}
			}
Esempio n. 2
0
				private void UpdateCreepCountAndStopCurrentBehavior(WaveGenerator waveGenerator)
				{
					creepCountForCurrentWave += creepCount;
					creepsSpawnedFromCurrentGroup = 0;
					waveGenerator.Start<WaveCreation>();
					waveGenerator.waveList[0].CreepsAndGroupsList.RemoveAt(0);
					waveGenerator.Stop<SpawnAllCreepsInGroup>();
				}