Example #1
0
    public override void copyFrom(UITweener value)
    {
        base.copyFrom(value);

        UITweenSize other = value as UITweenSize;

        if (other != null)
        {
            this.from = other.from;
            this.to   = other.to;
        }
    }
Example #2
0
    /// <summary>
    /// Start the tweening operation.
    /// </summary>

    public static UITweenSize Begin(GameObject go, float duration, Vector3 scale)
    {
        UITweenSize comp = UITweener.Begin <UITweenSize>(go, duration);

        comp.from = comp.value;
        comp.to   = scale;

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