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

[Test, CloseAfterFirstFrame]
public void ResetResetsCurrentFrameAndElapsed()
{
    var animation = new Sprite(material, Vector2D.Half) { CurrentFrame = 3, Elapsed = 3.0f };
    animation.Reset();
    RunAfterFirstFrame(() =>
    {
        Assert.AreEqual(0, animation.CurrentFrame);
        Assert.AreEqual(0.05f, animation.Elapsed);
    });
}
See Also