Пример #1
0
    /// <summary>
    /// Start the tweening operation.
    /// </summary>

    static public TweenLabelNumber Begin(GameObject go, float duration, float from, float to)
    {
        TweenLabelNumber comp = UITweener.Begin <TweenLabelNumber>(go, duration);

        comp.from = from;
        comp.to   = to;

        if (duration <= 0f)
        {
            comp.Sample(1f, true);
            comp.enabled = false;
        }
        return(comp);
    }
Пример #2
0
    /// <summary>
    /// Start the tweening operation.
    /// </summary>

    static public TweenLabelNumber Begin(GameObject go, float duration, int number)
    {
                #if UNITY_EDITOR
        if (!Application.isPlaying)
        {
            return(null);
        }
                #endif
        TweenLabelNumber comp = UITweener.Begin <TweenLabelNumber>(go, duration);
        comp.from = comp.number;
        comp.to   = number;

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