Example #1
0
		public void CreepWaveDataCreationFromWave()
		{
			var wave = new Wave(5.0f, 1.0f, "Cloth, Iron, Paper, Wood, Glass, Sand, Plastic", "CreepWave");
			creepWave = new CreepWave(wave);
			Assert.AreEqual(5.0f, creepWave.WaitTime);
			Assert.AreEqual(1.0f, creepWave.SpawnInterval);
			Assert.AreEqual(7, creepWave.CreepsAndGroupsList.Count);
		}
Example #2
0
		public Wave(Wave wave)
		{
			WaitTime = wave.WaitTime;
			SpawnInterval = wave.SpawnInterval;
			ShortName = wave.ShortName;
			MaxTime = wave.MaxTime;
			MaxSpawnItems = wave.MaxSpawnItems;
			SpawnTypeList = wave.SpawnTypeList;
		}
Example #3
0
		public void AddWave(float waitingTime, float spawningInterval, float maximumTime,
			string thingsToSpawn, string shortName, int maxSpawnItems)
		{
			if (string.IsNullOrEmpty(shortName))
				shortName = "Wave " + (viewModel.Level.Waves.Count + 1);
			var newWave = new Wave(waitingTime, spawningInterval, thingsToSpawn, shortName, maximumTime, maxSpawnItems);
			viewModel.Level.AddWave(newWave);
			if (string.IsNullOrEmpty(thingsToSpawn))
				return;
			viewModel.WaveList.Add(newWave);
			if (!viewModel.WaveNameList.Contains(viewModel.WaveName))
				viewModel.WaveNameList.Add(newWave.ShortName);
		}
Example #4
0
		public CreepWave(Wave wave)
			: this(
				wave.WaitTime, wave.SpawnInterval, wave.ToString(), wave.ShortName,
				wave.MaxTime, wave.MaxSpawnItems) {}
Example #5
0
		public void AddWave(Wave wave)
		{
			Waves.Add(wave);
		}
Example #6
0
 public void AddWave(Wave wave)
 {
     Waves.Add(wave);
 }