In my new game I want to destroy an enemy.
The enemy must be killed after 5 shots, for example.
I thought about using a counter for every enemy, but if I have 30 enemies in a level I should use one counter for each enemy.
Then I thought about creating different animations for each enemy, for example, if the enemy is hit in the first animation , pass to second animation, and so until fifth animation.
But this does not work because when I hit the enemy while animation 1 is running, recognizing the collision the program goes directly to fifth animation and the enemy dies at the first shot.
I hope to have explained well with my moot english.