Example #1
0
        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       = new FloatTween(tweenTarget, self.GetFloat(propertyName), to, duration);

            return(tween);
        }
Example #2
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);
        }