private bool ensureInterpolator() { if (this.Interpolator == null) { this.Interpolator = Interpolators.Get <T>(); } return(this.Interpolator != null); }
/// <summary> /// <para>Returns a Tween<T> 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<float> /// .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>())); }