public void GetTotalDurationTest() { var animation = new AnimationClip <float> { Animation = new SingleFromToByAnimation { From = 100, To = 200, Duration = TimeSpan.FromSeconds(6.0), }, Delay = TimeSpan.FromSeconds(10), Speed = 2, FillBehavior = FillBehavior.Hold, }; var animation2 = new AnimationClip <float> { Animation = new SingleFromToByAnimation { From = 10, To = 20, Duration = TimeSpan.FromSeconds(5.0), }, Delay = TimeSpan.Zero, Speed = 1, FillBehavior = FillBehavior.Hold, }; var animationEx = new Vector4FAnimation(); Assert.AreEqual(TimeSpan.FromSeconds(0.0), animationEx.GetTotalDuration()); animationEx = new Vector4FAnimation(); animationEx.W = animation; Assert.AreEqual(TimeSpan.FromSeconds(13.0), animationEx.GetTotalDuration()); animationEx = new Vector4FAnimation(); animationEx.X = animation; Assert.AreEqual(TimeSpan.FromSeconds(13.0), animationEx.GetTotalDuration()); animationEx = new Vector4FAnimation(); animationEx.Y = animation; Assert.AreEqual(TimeSpan.FromSeconds(13.0), animationEx.GetTotalDuration()); animationEx = new Vector4FAnimation(); animationEx.Z = animation; Assert.AreEqual(TimeSpan.FromSeconds(13.0), animationEx.GetTotalDuration()); animationEx = new Vector4FAnimation(); animationEx.W = animation; animationEx.X = animation2; Assert.AreEqual(TimeSpan.FromSeconds(13.0), animationEx.GetTotalDuration()); animationEx = new Vector4FAnimation(); animationEx.Y = animation2; animationEx.Z = animation; Assert.AreEqual(TimeSpan.FromSeconds(13.0), animationEx.GetTotalDuration()); }
public void GetTotalDurationTest() { var animation = new AnimationClip<float> { Animation = new SingleFromToByAnimation { From = 100, To = 200, Duration = TimeSpan.FromSeconds(6.0), }, Delay = TimeSpan.FromSeconds(10), Speed = 2, FillBehavior = FillBehavior.Hold, }; var animation2 = new AnimationClip<float> { Animation = new SingleFromToByAnimation { From = 10, To = 20, Duration = TimeSpan.FromSeconds(5.0), }, Delay = TimeSpan.Zero, Speed = 1, FillBehavior = FillBehavior.Hold, }; var animationEx = new Vector4FAnimation(); Assert.AreEqual(TimeSpan.FromSeconds(0.0), animationEx.GetTotalDuration()); animationEx = new Vector4FAnimation(); animationEx.W = animation; Assert.AreEqual(TimeSpan.FromSeconds(13.0), animationEx.GetTotalDuration()); animationEx = new Vector4FAnimation(); animationEx.X = animation; Assert.AreEqual(TimeSpan.FromSeconds(13.0), animationEx.GetTotalDuration()); animationEx = new Vector4FAnimation(); animationEx.Y = animation; Assert.AreEqual(TimeSpan.FromSeconds(13.0), animationEx.GetTotalDuration()); animationEx = new Vector4FAnimation(); animationEx.Z = animation; Assert.AreEqual(TimeSpan.FromSeconds(13.0), animationEx.GetTotalDuration()); animationEx = new Vector4FAnimation(); animationEx.W = animation; animationEx.X = animation2; Assert.AreEqual(TimeSpan.FromSeconds(13.0), animationEx.GetTotalDuration()); animationEx = new Vector4FAnimation(); animationEx.Y = animation2; animationEx.Z = animation; Assert.AreEqual(TimeSpan.FromSeconds(13.0), animationEx.GetTotalDuration()); }