コード例 #1
0
ファイル: Tween.cs プロジェクト: mtesseracttech/NeonArkanoid
 /// <summary>Factory creating a new timer.</summary>
 /// <remarks>
 /// Factory creating a new timer. The given callback will be triggered on
 /// each iteration start, after the delay.
 /// <br/><br/>
 /// The common use of Tweens is "fire-and-forget": you do not need to care
 /// for tweens once you added them to a TweenManager, they will be updated
 /// automatically, and cleaned once finished. Common call:
 /// <br/><br/>
 /// <pre>
 /// <code>
 /// Tween.call(myCallback)
 /// .delay(1.0f)
 /// .repeat(10, 1000)
 /// .start(myManager);
 /// </code>
 /// </pre>
 /// </remarks>
 /// <param name="callback">
 /// The callback that will be triggered on each iteration
 /// start.
 /// </param>
 /// <returns>The generated Tween.</returns>
 /// <seealso cref="TweenCallback">TweenCallback</seealso>
 public static TweenEngine.Tween Call(TweenCallback callback)
 {
     TweenEngine.Tween tween = pool.Get();
     tween.Setup(null, -1, 0);
     tween.SetCallback(callback);
     tween.SetCallbackTriggers(TweenCallback.START);
     return(tween);
 }