public void CanBeSetWithTheClipProperty() { Assert.That(animation.clip, Is.Not.Null); Assert.That(animation.clip, Is.SameAs(clip)); 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 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 WrapModeDefaultOnBothStateAndComponentWillTakeTheWrapModeFromTheClip() { animation["Clip1"].wrapMode = WrapMode.Default; animation.wrapMode = WrapMode.Default; animation.GetClip("Clip1").wrapMode = WrapMode.Loop; for (int i = 0; i < 4; i++) { animation.UpdateAnimationStates(0.55f); } Assert.That(animation["Clip1"].time, Is.AtMost(0.21f)); Assert.That(animation["Clip1"].enabled, Is.True); }