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);
 }
Beispiel #2
0
 public void BackAndForth()
 {
     if (Stop())
     {
         tweener.Ended -= BackAndForth;
     }
     else
     {
         tweener.Reverse();
     }
 }
Beispiel #3
0
 public static void BackAndForth(ITweener tweener)
 {
     tweener.Ended += delegate { tweener.Reverse(); };
 }
Beispiel #4
0
 public static void BackAndForth(ITweener tweener)
 {
     tweener.Ended += delegate { tweener.Reverse(); };
 }