Beispiel #1
0
        /// <summary>
        /// tweens the Cameras orthographicSize
        /// </summary>
        /// <returns>The korthographic size to.</returns>
        /// <param name="self">Self.</param>
        /// <param name="to">To.</param>
        /// <param name="duration">Duration.</param>
        public static ITween <float> OrthographicSizeTo(this Camera self, float to, float duration = 0.3f)
        {
            var tweenTarget = new CameraFloatTarget(self, CameraFloatTarget.CameraTargetType.OrthographicSize);
            var tween       = FloatTween.Create();

            tween.Initialize(tweenTarget, to, duration);

            return(tween);
        }
Beispiel #2
0
        /// <summary>
        /// tweens the Cameras fieldOfView
        /// </summary>
        /// <returns>The kfield of view to.</returns>
        /// <param name="self">Self.</param>
        /// <param name="to">To.</param>
        /// <param name="duration">Duration.</param>
        public static ITween <float> FieldOfViewTo(this Camera self, float to, float duration = 0.3f)
        {
            var tweenTarget = new CameraFloatTarget(self, CameraFloatTarget.CameraTargetType.FieldOfView);
            var tween       = FloatTween.Create();

            tween.Initialize(tweenTarget, to, duration);

            return(tween);
        }