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

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