Libgdx - How to Clean a Color?
Question
I'm trying to paint some images. I'm using sprites and setColor
, but, when I try to paint the image to white, doesn't work. It keeps the last color. I also try use Color.CLEAR
and later paint to white, but it doesn't work. So, how can i do it?
Solution
The Sprite#setColor method, sets the Color that will be used to tint the sprite when rendered with SpriteBatch.
The default color is white, if you set the color to white again, what you are doing is rendering the image exactly as it is (i.e. No tint).
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow