I have a game with a HUD which is drawn by fillrectangle
.
How would I fade these rectangles when the player is on the HUD?
I have a game with a HUD which is drawn by fillrectangle
.
How would I fade these rectangles when the player is on the HUD?
You can start a new thread, create a loop inside, and invoke this every few ms:
// decalre a golbal int i
i = (i + 1) % 0xFF
Color color = new Color(i, [your color], [your color], [your color]);
g.setColor(myColour); // graphics context object
And you'll see your canvas fading.