示例#1
0
        public static ITween <float> ZKintensityTo(this Light self, float to, float duration = 0.3f)
        {
            var tweenTarget = new LightTarget(self, LightTarget.LightTargetType.Intensity);
            var tween       = new FloatTween(tweenTarget, self.intensity, to, duration);

            return(tween);
        }
示例#2
0
        public static ITween <float> ZKspotAngleTo(this Light self, float to, float duration = 0.3f)
        {
            var tweenTarget = new LightTarget(self, LightTarget.LightTargetType.SpotAngle);
            var tween       = new FloatTween(tweenTarget, self.spotAngle, to, duration);

            return(tween);
        }
示例#3
0
        public static ITween <float> ZKalphaTo(this Image self, float to, float duration = 0.3f)
        {
            var tweenTarget = new ImageTarget(self, ImageTarget.ImageTargetType.Alpha);
            var tween       = new FloatTween(tweenTarget, self.color.a, to, duration);

            return(tween);
        }
示例#4
0
        public static ITween <float> ZKfillAmountTo(this Image self, float to, float duration = 0.3f)
        {
            var tweenTarget = new ImageTarget(self, ImageTarget.ImageTargetType.FillAmount);
            var tween       = new FloatTween(tweenTarget, self.fillAmount, to, duration);

            return(tween);
        }
示例#5
0
        public static ITween <float> ZKalphaTo(this CanvasGroup self, float to, float duration = 0.3f)
        {
            var tweenTarget = new CanvasGroupTarget(self);
            var tween       = new FloatTween(tweenTarget, self.alpha, to, duration);

            return(tween);
        }
示例#6
0
        public static ITween <float> ZKorthographicSizeTo(this Camera self, float to, float duration = 0.3f)
        {
            var tweenTarget = new CameraTarget(self, CameraTarget.CameraTargetType.OrthographicSize);
            var tween       = new FloatTween(tweenTarget, self.orthographicSize, to, duration);

            return(tween);
        }
示例#7
0
        public static ITween <float> ZKfieldOfViewTo(this Camera self, float to, float duration = 0.3f)
        {
            var tweenTarget = new CameraTarget(self, CameraTarget.CameraTargetType.FieldOfView);
            var tween       = new FloatTween(tweenTarget, self.fieldOfView, to, duration);

            return(tween);
        }
示例#8
0
        public static ITween <float> ZKpanStereoTo(this AudioSource self, float to, float duration = 0.3f)
        {
            var tweenTarget = new AudioSourceFloatTarget(self, AudioSourceFloatTarget.AudioSourceFloatType.PanStereo);
            var tween       = new FloatTween(tweenTarget, self.panStereo, to, duration);

            return(tween);
        }
示例#9
0
        public static ITween <float> ZKalphaTo(this Material self, float to, float duration = 0.3f, string propertyName = "_Color")
        {
            var tweenTarget = new MaterialAlphaTarget(self, propertyName);
            var tween       = new FloatTween(tweenTarget, self.GetColor(propertyName).a, to, duration);

            return(tween);
        }
示例#10
0
        public static ITween <float> ZKvolumeTo(this AudioSource self, float to, float duration = 0.3f)
        {
            var tweenTarget = new AudioSourceFloatTarget(self, AudioSourceFloatTarget.AudioSourceFloatType.Volume);
            var tween       = new FloatTween(tweenTarget, self.volume, to, duration);

            return(tween);
        }
示例#11
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);
        }
示例#12
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);
        }
示例#13
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);
        }
示例#14
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);
        }
示例#15
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);
        }
示例#16
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);
        }
示例#17
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);
        }
示例#18
0
        public static ITween <float> floatPropertyTo(object self, string propertyName, float from, float to, float duration)
        {
            var tweenTarget = new PropertyTarget <float>(self, propertyName);

            var tween = new FloatTween();

            tween.initialize(tweenTarget, from, to, duration);

            return(tween);
        }