Example #1
0
        public void TheQueuedClipWillBeStartedWhenTheRuningClipEnds()
        {
            string name = "MyClip";

            animation.AddClip(new AnimationClip()
            {
                length = 2, wrapMode = WrapMode.Once
            }, name);
            animation.Play(name);
            AnimationState state = animation.PlayQueued(name);

            for (int i = 0; i < 4; i++)
            {
                animation.UpdateAnimationStates(0.55f);
            }
            Assert.That(animation[name].enabled, Is.False);
            Assert.That(state.enabled, Is.True);
        }
        public void WillUpdateTimeOnAnEnabledClip()
        {
            animation.Play("Clip1");
            Assert.That(animation["Clip1"].time, Is.EqualTo(0));

            animation.UpdateAnimationStates(1.0f);
            Assert.That(animation["Clip1"].time, Is.EqualTo(1.0f));
        }
Example #3
0
 public void WrapModeOnceWillStopTheClip()
 {
     animation["Clip1"].wrapMode = WrapMode.Once;
     for (int i = 0; i < 4; i++)
     {
         animation.UpdateAnimationStates(0.55f);
     }
     Assert.That(animation["Clip1"].time, Is.EqualTo(animation["Clip1"].length));
     Assert.That(animation["Clip1"].enabled, Is.False);
 }