Sprite Reset Method Delta Engine Documentation

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

public void Reset()
Remarks

Tests: Breakout.Tests.BallInLevelTests
Remarks

Tests: Breakout.Tests.BallInLevelTests
Examples

1 unit tests call DeltaEngine.Rendering2D.Sprite.Reset
[Test, CloseAfterFirstFrame]
public void ResetBallLosesLive()
{
    var score = Resolve<Score>();
    bool lost = false;
    score.GameOver += () => lost = true;
    var ball = Resolve<BallInLevel>();
    ball.ResetBall();
    ball.ResetBall();
    ball.ResetBall();
    Assert.IsTrue(lost);
}
Examples

1 unit tests call DeltaEngine.Rendering2D.Sprite.Reset
[Test, CloseAfterFirstFrame]
public void ResetBallLosesLive()
{
    var score = Resolve<Score>();
    bool lost = false;
    score.GameOver += () => lost = true;
    var ball = Resolve<BallInLevel>();
    ball.ResetBall();
    ball.ResetBall();
    ball.ResetBall();
    Assert.IsTrue(lost);
}
See Also