Health For Each Enemy
as my game progresses the enemies get stronger. To make the enemies stronger I made a private int called thealth (probably a bad programming choice) and each time the sprite is tou
Solution 1:
Suggestions to fix your code:
Make sure the enemy sprite is a class and thealth is contained in it(a little obvious but just in case)
Make sure the thealth variable doesn't have the static keyword (if it does then that variable will be shared in all instances of the class).
eg.
classEnemyextendsSprite{
int thealth=4; //Or whatever you want really
}
Post a Comment for "Health For Each Enemy"