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

            UITweenAlpha other = value as UITweenAlpha;

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

        public static UITweenAlpha Begin(GameObject go, float duration, float alpha)
        {
            UITweenAlpha comp = UITweener.Begin <UITweenAlpha>(go, duration);

            comp.from = comp.value;
            comp.to   = alpha;

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