How would I make it so an instance variable only affects a specific spawned sprite instead of all at once?
For example, I have an instance variable set so that if an enemy collides with the player it will change the instance variable and that will cause it to set to an animation and destroy itself. But when one enemy changes the animation, any other enemies will also change animations because the variable changed.
Is there some way around this, or a different way that makes more sense?