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

            UITweenScale other = value as UITweenScale;

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

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

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

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