Sprite Set Method Delta Engine Documentation

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

public override void Set(
	Object component
)
Remarks

Tests: DeltaEngine.Scenes.Tests.Controls.PictureTests
Examples

4 unit tests call DeltaEngine.Rendering2D.Sprite.Set(System.Object)
[Test]
public void SetAppearance()
{
    material = new Material(Color.Red);
    picture.SetAppearance(material);
    Assert.AreEqual(material, picture.Material);
    Assert.AreEqual(material.DefaultColor, picture.Color);
}
[Test]
public void SetAppearanceWithNullShouldReturn()
{
    Assert.DoesNotThrow(() => picture.SetAppearance(null));
}
[Test]
public void SetAppearanceWithoutInterpolationWithNullShouldReturn()
{
    Assert.DoesNotThrow(() => picture.SetAppearanceWithoutInterpolation(null));
}
See Also