示例#1
0
        /// <summary>
        /// transform.localEulers tween
        /// </summary>
        /// <returns>The klocal eulers to.</returns>
        /// <param name="self">Self.</param>
        /// <param name="to">To.</param>
        /// <param name="duration">Duration.</param>
        public static ITween <Vector2> tweenLocalRotationDegreesTo(this Transform self, float to, float duration = 0.3f)
        {
            var tween = QuickCache <TransformVector2Tween> .pop();

            tween.setTargetAndType(self, TransformTargetType.LocalRotationDegrees);
            tween.initialize(tween, new Vector2(to), duration);

            return(tween);
        }
示例#2
0
        /// <summary>
        /// transform.localPosition tween
        /// </summary>
        /// <returns>The klocal position to.</returns>
        /// <param name="self">Self.</param>
        /// <param name="to">To.</param>
        /// <param name="duration">Duration.</param>
        public static ITween <Vector2> tweenLocalPositionTo(this Transform self, Vector2 to, float duration = 0.3f)
        {
            var tween = QuickCache <TransformVector2Tween> .pop();

            tween.setTargetAndType(self, TransformTargetType.LocalPosition);
            tween.initialize(tween, to, duration);

            return(tween);
        }