Alright I haven't been here for awhile.
I was trying to make games in C++ but learned that I find Java much more easier and entertaining.
So i have this problem with the health bar. It seems every time it gets "hit" or if 1+ is subtracted from the total health, it always makes itself equal to 0.
Here is the one piece of code that I am sure is causing the problem:
g2d.fillRect(610,80,25,Math.round(500 * (CurrentWave.getHealth() / 3000)));
3000 is the total health.
500 is the height of the rectangle.
I tried adding the health bar to the enemy and same problem occurs. I have no idea why the rectangle's height is changed to 0 every time a number is subtracted from it.
Please help, thank you...