/// <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 = ZestKit.cacheColorTweens ? QuickCache<ColorTween>.pop() : new ColorTween(); tween.initialize( 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, self.GetColor( propertyName ), to, duration ); return tween; }