public void WeCanReverseTweening() { tweener.Reset(Color.Black, Color.White, TimeSpan.FromSeconds(1)); tweener.Play(); tweener.Update(new GameTime(TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(1))); tweener.Reverse(); tweener.Update(new GameTime(TimeSpan.FromSeconds(2), TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(2), TimeSpan.FromSeconds(1))); Assert.AreEqual(Color.Black, tweener.Position); }
public void BackAndForth() { if (Stop()) { tweener.Ended -= BackAndForth; } else { tweener.Reverse(); } }
public static void BackAndForth(ITweener tweener) { tweener.Ended += delegate { tweener.Reverse(); }; }