Пример #1
0
        // -------------------------------------------------------------------------------------------
        /// <summary>
        /// Rotates the target around the specified local position from the specified angle to its current angle.
        /// </summary>
        /// <param name="localPoint"></param>
        /// <param name="angle"></param>
        /// <returns></returns>
        public Tween TransformAroundPointFrom(Vector3 localPoint, float angle)
        {
            Transform      t = GetTransform("transformAroundPointFrom");
            TweenTransform p = new TweenTransform(t);

            p.Rotate(t.localRotation.z, angle);
            p.TransformAroundPoint(localPoint);
            _procedures.Add(p);
            return(this);
        }
Пример #2
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);
        }
Пример #3
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);
        }