Exemple #1
0
        public static ITween <Color> ZKcolorTo(this Material self, Color to, float duration = 0.3f, string propertyName = "_Color")
        {
            var tweenTarget = new MaterialColorTarget(self, propertyName);
            var tween       = new ColorTween(tweenTarget, self.GetColor(propertyName), to, duration);

            return(tween);
        }
        /// <summary>
        /// tweens any Material Color property
        /// </summary>
        /// <returns>The kcolor 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 <Color> ZKcolorTo(this Material self, Color to, float duration = 0.3f, string propertyName = "_Color")
        {
            var tweenTarget = new MaterialColorTarget(self, propertyName);
            var tween       = ColorTween.create();

            tween.initialize(tweenTarget, to, duration);

            return(tween);
        }