Entity2DTests GetComponentValuesInDrawState Method Delta Engine Documentation

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

public void GetComponentValuesInDrawState()
Examples

[Test]
public void GetComponentValuesInDrawState()
{
    var entity = new Entity2D(Rectangle.One)
    {
        Color = Color.Red,
        Rotation = 1.0f,
        RotationCenter = Vector2D.One
    };
    EntitiesRunner.Current.State = UpdateDrawState.Draw;
    Assert.AreEqual(entity.DrawArea, entity.Get<Rectangle>());
    Assert.AreEqual(entity.Color, entity.Get<Color>());
    Assert.AreEqual(entity.Rotation, entity.Get<float>());
    Assert.AreEqual(entity.RotationCenter, entity.Get<Vector2D>());
}
See Also