Exemplo n.º 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> SpotAngleTo(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);
        }
Exemplo n.º 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> AlphaTo(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);
        }
Exemplo n.º 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> FillAmountTo(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);
        }
Exemplo n.º 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> 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);
        }
Exemplo n.º 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> 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);
        }
Exemplo n.º 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> PanStereoTo(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);
        }
Exemplo n.º 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> FloatTo(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);
        }