Example #1
0
        public void Animation_IsPaused_AfterPause_Test()
        {
            // ReSharper disable once NotAccessedVariable
            var targetValue = 1.0f;
            var animation   = new FloatTransition(() => 2.0f, a => targetValue = a, 3.0f, new TransitionParameters(2.0f));

            animation.Pause();
            Assert.IsTrue(animation.IsPaused);
        }
Example #2
0
        public void Animation_IsPaused_PreventsChange_Test()
        {
            // ReSharper disable once NotAccessedVariable
            var targetValue = 1.0f;
            var animation   = new FloatTransition(() => 2.0f, a => targetValue = a, 3.0f, new TransitionParameters(2.0f));

            animation.Update(1.0f);
            Assert.AreEqual(1.0f, animation.CurrentTime);

            animation.Pause();
            animation.Update(1.0f);
            Assert.AreEqual(1.0f, animation.CurrentTime);
            Assert.IsFalse(animation.IsComplete);
        }