Ejemplo n.º 1
0
 private bool ensureInterpolator()
 {
     if (this.Interpolator == null)
     {
         this.Interpolator = Interpolators.Get <T>();
     }
     return(this.Interpolator != null);
 }
Ejemplo n.º 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>()));
 }