Wave ClassDelta Engine Documentation
DataContainer that provides data which object should be created when a wave is started. View code on GitHub
Inheritance Hierarchy

System Object
  DeltaEngine.GameLogic Wave
    CreepyTowers.Enemy.Creeps CreepWave

Namespace: DeltaEngine.GameLogic
Assembly: DeltaEngine.GameLogic (in DeltaEngine.GameLogic.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public class Wave

The Wave type exposes the following members.

Constructors

  NameDescription
Public methodWave(Wave)
Initializes a new instance of the Wave class
Public methodWave(Single, Single, String, String, Single, Int32)
Initializes a new instance of the Wave class
Top
Methods

  NameDescription
Public methodAsXmlData
Public methodToString (Overrides Object ToString .)
Top
Fields

  NameDescription
Public fieldSpawnTypeList
Top
Properties

  NameDescription
Public propertyMaxSpawnItems
Public propertyMaxTime
Public propertyShortName
Public propertySpawnInterval
Public propertyWaitTime
Top
Remarks

Tests: DeltaEngine.GameLogic.Tests.WaveTests
Examples

2 unit tests call DeltaEngine.GameLogic.Wave
[Test]
public void CopyingWaveCopiesTheWaveData()
{
    var wave = new Wave(0.1f, 0.5f, "Cloth", "");
    var copiedWave = new Wave(wave);
    Assert.AreEqual("0.1, 0.5, 0, 1, Cloth", copiedWave.ToString());
}
[Test]
public void TestWaveXmlData()
{
    var wave = new Wave(0.1f, 1.0f, "Paper, Cloth", "Dummy");
    var waveXml = wave.AsXmlData();
    Assert.AreEqual("Dummy", waveXml.GetAttributeValue("ShortName"));
    Assert.AreEqual("0.1", waveXml.GetAttributeValue("WaitTime"));
    Assert.AreEqual("1", waveXml.GetAttributeValue("SpawnInterval"));
    Assert.AreEqual("Paper, Cloth", waveXml.GetAttributeValue("SpawnTypeList"));
    Assert.AreEqual("1", waveXml.GetAttributeValue("MaxSpawnItems"));
    Assert.AreEqual("0", waveXml.GetAttributeValue("MaxTime"));
}
See Also