MockContentLoaderTests LoadAnimationContentViaCreationData Method Delta Engine Documentation

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

public void LoadAnimationContentViaCreationData()
Examples

[Test]
public void LoadAnimationContentViaCreationData()
{
    var image = ContentLoader.Load<MockImage>("MockImage");
    var animationData = new SpriteSheetAnimationCreationData(image, 1.0f, new Size(1, 1));
    var animation = ContentLoader.Create<SpriteSheetAnimation>(animationData);
    Assert.AreEqual(animationData.Image, animation.Image);
    Assert.AreEqual(animationData.DefaultDuration, animation.DefaultDuration);
    Assert.AreEqual(animationData.SubImageSize, animation.SubImageSize);
}
See Also