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); }
public Wave(Wave wave) { WaitTime = wave.WaitTime; SpawnInterval = wave.SpawnInterval; ShortName = wave.ShortName; MaxTime = wave.MaxTime; MaxSpawnItems = wave.MaxSpawnItems; SpawnTypeList = wave.SpawnTypeList; }
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); }
public CreepWave(Wave wave) : this( wave.WaitTime, wave.SpawnInterval, wave.ToString(), wave.ShortName, wave.MaxTime, wave.MaxSpawnItems) {}
public void AddWave(Wave wave) { Waves.Add(wave); }