Velocity2DTests ApplyUpdateWithVelocity Method Delta Engine Documentation

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

public void ApplyUpdateWithVelocity()
Examples

[Test]
public void ApplyUpdateWithVelocity()
{
    var entity2D = new Entity2D(new Rectangle(0, 0, 1, 1));
    entity2D.Add(velocity);
    entity2D.Start<Velocity2D.PositionUpdate>();
    var originalPosition = entity2D.Center;
    entity2D.Get<Velocity2D.Data>().Accelerate(2.0f, 90.0f);
    AdvanceTimeAndUpdateEntities();
    Assert.AreNotEqual(originalPosition, entity2D.Center);
}
See Also