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

[Test, CloseAfterFirstFrame]
public void FramesWillNotAdvanceIfIsPlayingFalse()
{
    var animation = new Sprite(material, Vector2D.Half);
    bool endReached = false;
    animation.AnimationEnded += () => { endReached = true; };
    animation.IsPlaying = false;
    AdvanceTimeAndUpdateEntities(animation.Material.Duration);
    Assert.IsFalse(endReached);
}
See Also