コード例 #1
0
    public static TweenValue Begin(GameObject widget, TweenValueAdapter target, float duration, float value)
    {
        TweenValue.mTarget = target;
        TweenValue tweenValue = UITweener.Begin <TweenValue>(widget, duration);

        tweenValue.from = target.value;
        tweenValue.to   = value;
        if (duration <= 0f)
        {
            tweenValue.Sample(1f, true);
            tweenValue.enabled = false;
        }
        return(tweenValue);
    }
コード例 #2
0
    /// <summary>
    /// Start the tweening operation.
    /// </summary>

    static public TweenValue Begin(GameObject widget, TweenValueAdapter target, float duration, float value)
    {
        mTarget = target;

        TweenValue comp = UITweener.Begin <TweenValue>(widget, duration);

        comp.from = target.value;
        comp.to   = value;

        if (duration <= 0f)
        {
            comp.Sample(1f, true);
            comp.enabled = false;
        }
        return(comp);
    }