public void Test_GetPlaybackPoisition() { var clip = new AnimationClip (100, "ClipName"); clip.Duration = 2; clip.WrapMode = WrapMode.Once; Assert.AreEqual (1, clip.GetPlaybackPosition (1)); Assert.AreEqual (2, clip.GetPlaybackPosition (2)); Assert.AreEqual (3, clip.GetPlaybackPosition (3)); clip.WrapMode = WrapMode.Loop; Assert.AreEqual (1, clip.GetPlaybackPosition (1)); Assert.AreEqual (0, clip.GetPlaybackPosition (2)); Assert.AreEqual (1, clip.GetPlaybackPosition (3)); }
public void Test_SetSpeed() { var clip = new AnimationClip (100, "ClipName"); clip.SetPlaybackPoisition (10, 1); clip.SetSpeed (2, 1); Assert.AreEqual (10, clip.GetPlaybackPosition (1)); Assert.AreEqual (12, clip.GetPlaybackPosition (2)); Assert.AreEqual (14, clip.GetPlaybackPosition (3)); }