Hi, Is it possible to tween a tint? So going from the default 0xFFF to a slightly darker tint 0x757575 over a period of time. Ive tried: tween.to({ tint: 0x757575 }, 5000, Phaser.Easing.Linear.None);But it seems to cycle through R,G,B or something to create some crazy colours until it reaches the end tint. Really all I want to do is darken the sprite over a period of time. Many Thanks, -Alex
The Phaser.Color object has a range of different tools for this kind of thing, such as interpolateColor - with a bit of imagination you can create a function to let you tween colours, like this: function tweenTint(obj, startColor, endColor, time) { // create an object to tween with our step value at 0 var colorBlend = {step: 0}; // create the tween on this object and tween its step property to 100 var colorTween = game.add.tween(colorBlend).to({step: 100}, time); // run the in