예제 #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);
		}
예제 #2
0
파일: Wave.cs 프로젝트: whztt07/DeltaEngine
		public Wave(Wave wave)
		{
			WaitTime = wave.WaitTime;
			SpawnInterval = wave.SpawnInterval;
			ShortName = wave.ShortName;
			MaxTime = wave.MaxTime;
			MaxSpawnItems = wave.MaxSpawnItems;
			SpawnTypeList = wave.SpawnTypeList;
		}
예제 #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);
		}
예제 #4
0
		public CreepWave(Wave wave)
			: this(
				wave.WaitTime, wave.SpawnInterval, wave.ToString(), wave.ShortName,
				wave.MaxTime, wave.MaxSpawnItems) {}
예제 #5
0
		public void AddWave(Wave wave)
		{
			Waves.Add(wave);
		}
예제 #6
0
 public void AddWave(Wave wave)
 {
     Waves.Add(wave);
 }