예제 #1
0
파일: dfTween.cs 프로젝트: Genesic/Tower
 private bool ensureInterpolator()
 {
     if (this.Interpolator == null)
     {
         this.Interpolator = Interpolators.Get <T>();
     }
     return(this.Interpolator != null);
 }
예제 #2
0
 /// <summary>
 /// <para>Returns a Tween&lt;T&gt; object that is configured to animate the named property of the target object.</para>
 /// <b>For example, to tween the "timeScale" property of a custom class, you could use the following:</b><pre><code>
 /// var tween = TweenProperty&lt;float&gt;
 ///		.Obtain( target, "timeScale" )
 ///		.SetStartValue( 0f )
 ///		.SetEndValue( 1f )
 ///		.SetDuration( 0.5f );
 /// </code></pre>
 /// </summary>
 /// <param name="target">The object to be animated</param>
 /// <param name="propertyName">The name of the property to be animated</param>
 public static Tween <T> Obtain(object target, string propertyName)
 {
     return(Obtain(target, propertyName, Interpolators.Get <T>()));
 }