Example #1
0
        /// <summary>
        /// tweens a Lights spotAngle property
        /// </summary>
        /// <returns>The kspot angle to.</returns>
        /// <param name="self">Self.</param>
        /// <param name="to">To.</param>
        /// <param name="duration">Duration.</param>
        public static ITween <float> ZKspotAngleTo(this Light self, float to, float duration = 0.3f)
        {
            var tweenTarget = new LightFloatTarget(self, LightFloatTarget.LightTargetType.SpotAngle);
            var tween       = FloatTween.create();

            tween.initialize(tweenTarget, to, duration);

            return(tween);
        }
Example #2
0
        /// <summary>
        /// tweens a Text color alpha property
        /// </summary>
        /// <param name="self">Self.</param>
        /// <param name="to">To.</param>
        /// <param name="duration">Duration.</param>
        /// <returns></returns>
        public static ITween <float> ZKalphaTo(this Text self, float to, float duration = 0.3f)
        {
            var tweenTarget = new TextAlphaTarget(self);
            var tween       = FloatTween.create();

            tween.initialize(tweenTarget, to, duration);

            return(tween);
        }
Example #3
0
        /// <summary>
        /// tweens an Images fillAmount property
        /// </summary>
        /// <returns>The kfill amount to.</returns>
        /// <param name="self">Self.</param>
        /// <param name="to">To.</param>
        /// <param name="duration">Duration.</param>
        public static ITween <float> ZKfillAmountTo(this Image self, float to, float duration = 0.3f)
        {
            var tweenTarget = new ImageFloatTarget(self, ImageFloatTarget.ImageTargetType.FillAmount);
            var tween       = FloatTween.create();

            tween.initialize(tweenTarget, to, duration);

            return(tween);
        }
Example #4
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> ZKorthographicSizeTo(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);
        }
Example #5
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> ZKfieldOfViewTo(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);
        }
Example #6
0
        /// <summary>
        /// tweens an AudioSource panStereo property
        /// </summary>
        /// <returns>The kpan stereo to.</returns>
        /// <param name="self">Self.</param>
        /// <param name="to">To.</param>
        /// <param name="duration">Duration.</param>
        public static ITween <float> ZKpanStereoTo(this AudioSource self, float to, float duration = 0.3f)
        {
            var tweenTarget = new AudioSourceFloatTarget(self, AudioSourceFloatTarget.AudioSourceFloatType.PanStereo);
            var tween       = FloatTween.create();

            tween.initialize(tweenTarget, to, duration);

            return(tween);
        }
Example #7
0
        /// <summary>
        /// tweens any Material float property
        /// </summary>
        /// <returns>The kfloat to.</returns>
        /// <param name="self">Self.</param>
        /// <param name="to">To.</param>
        /// <param name="duration">Duration.</param>
        /// <param name="propertyName">Property name.</param>
        public static ITween <float> ZKfloatTo(this Material self, float to, float duration = 0.3f, string propertyName = "_Color")
        {
            var tweenTarget = new MaterialFloatTarget(self, propertyName);
            var tween       = FloatTween.create();

            tween.initialize(tweenTarget, to, duration);

            return(tween);
        }