Example #1
0
        public static TweenLocalRotation TweenRotation(this Transform transform, Quaternion target, float duration, float delay = 0)
        {
            var tweener       = new Tweener();
            var tweenProperty = new TweenLocalRotation(transform, transform.rotation, target, delay, duration + delay);

            tweener.Add(tweenProperty);
            tweener.PlayForward();
            return(tweenProperty);
        }
Example #2
0
        public static TweenLocalRotation RotateLocal(this Transform transform, Vector3 target, float duration, float delay = 0)
        {
            var tweener       = new Tweener();
            var tweenProperty = new TweenLocalRotation(transform, transform.localRotation.eulerAngles, target, delay, duration + delay);

            tweener.Add(tweenProperty);
            tweener.PlayForward();
            return(tweenProperty);
        }