BallTests BounceOnTopSideToMoveDown 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 BounceOnTopSideToMoveDown()
Examples

[Test, CloseAfterFirstFrame]
public void BounceOnTopSideToMoveDown()
{
    var paddle = Resolve<Paddle>();
    var ball = new TestBall(paddle) { CurrentVelocity = new Vector2D(-0.5f, -0.5f) };
    ball.SetPosition(new Vector2D(0.5f, 0));
    AdvanceTimeAndUpdateEntities(0.01f);
    Assert.AreEqual(new Vector2D(-0.5f, 0.5f), ball.CurrentVelocity);
}
See Also