GameTests RemoveBallIfGameIsOver Method Delta Engine Documentation

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

public void RemoveBallIfGameIsOver()
Examples

[Test, CloseAfterFirstFrame]
public void RemoveBallIfGameIsOver()
{
    var score = Resolve<Score>();
    bool isGameOver = false;
    score.GameOver += () => isGameOver = true;
    score.LifeLost();
    score.LifeLost();
    score.LifeLost();
    Assert.IsTrue(isGameOver);
}
See Also