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 WillBePlayedAutomaticallyOnAwakeIfPlayAutomaticallyIsSet() { Assert.That(animation.playAutomatically, Is.False); Assert.That(animation.isPlaying, Is.False); Assert.That(animation[name].enabled, Is.False); Assert.That(animation.IsPlaying(name), Is.False); animation.playAutomatically = true; animation.Awake(); Assert.That(animation.isPlaying, Is.True); Assert.That(animation[name].enabled, Is.True); Assert.That(animation.IsPlaying(name), Is.True); }