Example #1
0
        public void Setup()
        {
            animation = new Components.Animation();

            animation.AddClip(new AnimationClip() { length = 10 }, "Clip1");
            animation.AddClip(new AnimationClip() { length = 10 }, "Clip2");
            animation.AddClip(new AnimationClip() { length = 10 }, "Clip3");
        }
Example #2
0
        public void PlayWillReturnTrueAndEnableTheClipIfPresent()
        {
            string        name = "MyClip";
            AnimationClip clip = new AnimationClip();

            animation.AddClip(clip, name);

            Assert.That(animation.Play(name), Is.True);
            Assert.That(animation.IsPlaying(name), Is.True);
            Assert.That(animation.isPlaying, Is.True);
        }
Example #3
0
        public void TheClipWillGetAStateAndWeCanFindItAgain()
        {
            string        name = "MyClip";
            AnimationClip clip = new AnimationClip();

            animation.AddClip(clip, name);
            Assert.That(animation[name], Is.Not.Null);
            Assert.That(animation.GetClip(name), Is.Not.Null);
            Assert.That(animation.GetClip(name), Is.SameAs(clip));
            Assert.That(animation.GetClipCount(), Is.EqualTo(1));
        }
Example #4
0
        public void ItWillBeEnabledImmidiatelyIfNoOtherClipsArePlaying()
        {
            string        name = "MyClip";
            AnimationClip clip = new AnimationClip();

            animation.AddClip(clip, name);

            AnimationState state = animation.PlayQueued(name);

            Assert.That(state.enabled, Is.True);
            Assert.That(state.playQueuedReference, Is.True);
            Assert.That(state, Is.Not.SameAs(animation[name]));
            Assert.That(animation[name].playQueuedReference, Is.False);
        }
Example #5
0
        public void Setup()
        {
            animation = new Components.Animation();

            animation.AddClip(new AnimationClip() { length = 2 }, "Clip1");
            animation.Play("Clip1");
        }
        public void Setup()
        {
            animation = new Components.Animation();

            animation.AddClip(new AnimationClip()
            {
                length = 10
            }, "Clip1");
            animation.AddClip(new AnimationClip()
            {
                length = 10
            }, "Clip2");
            animation.AddClip(new AnimationClip()
            {
                length = 10
            }, "Clip3");
        }
Example #7
0
        public void Setup()
        {
            animation = new Components.Animation();

            animation.AddClip(new AnimationClip()
            {
                length = 2
            }, "Clip1");
            animation.Play("Clip1");
        }