Okay, so I’ve got two variables that I need to know what percent they are. I got a bar that goes up to 100, and the first variable is 120, and the second one is (100 - 60) it’s the 60 in that equation. Anyway, how do I show them from only 1 to 100?
//draw particle bar background
g.setColor(new Color(0,0,255));
g.fillRect(10, 170, 100, 5);
if(player.particleMode){
g.setColor(new Color(0,255,255));
g.fillRect(10, 170, player.particleTime, 5);
}
else{
g.setColor(new Color(255,0,0));
g.fillRect(10, 170, 100 - player.particleDelay, 5);
}