Yeah, the mind blank was if there was an easy way to just make the sprite lighter. I think I was thinking about tinting, from the Flash days. This is how I solved it:
local brightness =math.random(10)/10
r = r/255 + lightness
g = g/255 + lightness
b = b/255 + lightness
sprite:setColorTransform(r,g,b)
Cool, yeh I've used this a lot in my game for animating a day night cycle. I set the color on each corner of a mesh and you can get a nice gradient for a sunrise and sunset
Comments
Likes: totebo
Ah, I see you solved it
Likes: totebo