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

            UITweenPosition other = value as UITweenPosition;

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

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

            comp.from = comp.value;
            comp.to   = pos;

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