Sprite Material Property Delta Engine Documentation

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

public Material Material { get; set; }

Property Value

Type: Material
Remarks

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

2 unit tests call DeltaEngine.Rendering2D.Sprite.Material
[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 SetAppearanceWithoutInterpolation()
{
    var newMaterial = new Material(Color.Red);
    picture.SetAppearanceWithoutInterpolation(newMaterial);
    Assert.AreEqual(newMaterial, picture.Material);
    Assert.AreEqual(newMaterial.DefaultColor, picture.Color);
}
See Also