AnimationTests CreateAnimationWithNewTextures 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 CreateAnimationWithNewTextures()
Examples

[Test, ApproveFirstFrameScreenshot]
public void CreateAnimationWithNewTextures()
{
    var imageList = new[]
    {
        CreateImageWithColor(Color.Red), CreateImageWithColor(Color.CornflowerBlue),
        CreateImageWithColor(Color.Purple)
    };
    var newMaterial = new ImageAnimation(imageList, 3).CreateMaterial(
        ContentLoader.Create<Shader>(new ShaderCreationData(ShaderFlags.Position2DTextured)));
    new Sprite(newMaterial, new Rectangle(0.25f, 0.25f, 0.5f, 0.5f));
}
See Also