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"); }
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); }
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)); }
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); }
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"); }
public void Setup() { animation = new Components.Animation(); animation.AddClip(new AnimationClip() { length = 2 }, "Clip1"); animation.Play("Clip1"); }