Esempio n. 1
0
        // -------------------------------------------------------------------------------------------
        /// <summary>
        /// Scales the target around the specified local position from the specified scale values to its current scale values.
        /// </summary>
        /// <param name="localPoint"></param>
        /// <param name="scaleX"></param>
        /// <param name="scaleY"></param>
        /// <returns></returns>
        public Tween TransformAroundPointFrom(Vector3 localPoint, float scaleX, float scaleY)
        {
            Transform      t = GetTransform("transformAroundPointFrom");
            TweenTransform p = new TweenTransform(t);

            p.Scale(t.localScale.x, t.localScale.y, scaleX, scaleY);
            p.TransformAroundPoint(localPoint);
            _procedures.Add(p);

            return(this);
        }
Esempio n. 2
0
        // -------------------------------------------------------------------------------------------
        /// <summary>
        /// Scales and rotates the target around the specified local position.
        /// </summary>
        /// <param name="localPoint"></param>
        /// <param name="angle"></param>
        /// <param name="scaleX"></param>
        /// <param name="scaleY"></param>
        /// <returns></returns>
        public Tween TransformAroundPoint(Vector3 localPoint, float angle, float scaleX, float scaleY)
        {
            Transform      t = GetTransform("transformAroundPoint");
            TweenTransform p = new TweenTransform(t);

            p.Rotate(t.localRotation.z, angle);
            p.Scale(t.localScale.x, t.localScale.y, scaleX, scaleY);
            p.TransformAroundPoint(localPoint);
            _procedures.Add(p);

            return(this);
        }
Esempio n. 3
0
        // -------------------------------------------------------------------------------------------
        /// <summary>
        /// Scales the target from the specified scale value to its current scale value.
        /// </summary>
        /// <param name="scaleX"></param>
        /// <param name="scaleY"></param>
        /// <returns></returns>
        public Tween ScaleFrom(float scaleX, float scaleY)
        {
            Transform t = GetTransform();

            if (t != null)
            {
                TweenTransform p = new TweenTransform(t);
                p.Scale(scaleX, scaleY, t.localScale.x, t.localScale.y);
                _procedures.Add(p);
            }
            else
            {
                From("scaleX", scaleX);
                From("scaleY", scaleY);
            }
            return(this);
        }