WaveTests LetWaveReachItsTarget Method Delta Engine Documentation

Namespace: GhostWars.Tests
Assembly: GhostWars.Tests (in GhostWars.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public void LetWaveReachItsTarget()
Examples

[Test, CloseAfterFirstFrame]
public void LetWaveReachItsTarget()
{
    var targetReached = false;
    var wave = new GhostWave(Vector2D.Half, Vector2D.Half + new Vector2D(0.01f, 0.01f), 5,
        Team.ComputerPurple.ToColor());
    wave.TargetReached += (t1, t2) => targetReached = true;
    AdvanceTimeAndUpdateEntities(0.25f);
    Assert.IsTrue(targetReached);
    Assert.IsFalse(wave.IsActive);
}
See Also