Entity2D Rotation Property Delta Engine Documentation

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

public float Rotation { get; set; }

Property Value

Type: Single
Remarks

Tests: Asteroids.Tests.PlayerShipTests
Examples

1 unit tests call DeltaEngine.Rendering2D.Entity2D.Rotation
[Test, CloseAfterFirstFrame]
public void TurnChangesAngleCorrectly()
{
    float originalAngle = playerShip.Rotation;
    playerShip.SteerLeft();
    Assert.Less(playerShip.Rotation, originalAngle);
    originalAngle = playerShip.Rotation;
    playerShip.SteerRight();
    Assert.Greater(playerShip.Rotation, originalAngle);
}
See Also