public void WeCanTweenFromBlackToWhite() { tweener.Reset(Color.Black, Color.White, TimeSpan.FromSeconds(10)); tweener.Play(); for (int i = 0; i < 10; i++) { tweener.Update(new GameTime(TimeSpan.FromSeconds(i), TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(i), TimeSpan.FromSeconds(1))); Console.WriteLine(tweener.Position); } Assert.AreEqual(Color.White, tweener.Position); }
protected override void OnTweenUpdate() { for (int i = playingTweeners.Count - 1; i >= 0; --i) { ITweener tweener = playingTweeners[i]; tweener.Update(); if (!tweener.IsPlaying) { playingTweeners.RemoveAt(i); } } if (playingTweeners.Count == 0) { NewMarkCompleted(); } }
public void Update() { if (IsPause) { return; } if (IsComplete) { return; } realTime = timeProvider.Time; if (!InDelay) { tweener.Update(Time); if (IsComplete) { processComplete(); } } }