i would like to change the png as the <objects> health lowers but in cant figure it out???
i have the health bar from danposts senario progress bar/health bar!!


1 | setImage( "myImage.png" ); |
1 | private int previousHealth; |
1 | previousHealth = yourVariableWhichHoldsTheCurrentHealth; |
1 2 3 4 5 6 | private void lookForHealthDifference() { if (previousHealth > yourVariableWhichHoldsTheCurrentHealth) { setImage( "myImage.png" ); } } |
1 | lookForHealthDifference(); |
1 | private int yourVariableWhichHoldsTheCurrentHealth |