Im creating a game where a player can use a sword to kill monsters. I want the monsters to each have their own health values and for the player to decrease their health value every time they hit them with a sword.
My issue is that all my monsters are created from the same class with one health variable. When that variable reaches 0 they're removed from the world. So if one dies they all die.
is there a way I can use instanceof to make this work properly where they each have individual health? or is there a simpler way?

