Hey guys, so building my first game, and ran into an issue that I can't seem to resolve. First, here is a link to the game so you'd know what I'm talking about:
The issue has to do with enemy lives. With the small enemy plane, I have no issues because 1 hit kills that enemy, and it's not in an instance variable. But I wanted the submarine to have 4 lives, so I made it have instance variable of 3. The problem with that, is that if there's more than 1 sub on the screen and one gets destroyed, the other gets destroyed too.
My question is, should I add something else to make each sub unique so that they wouldn't all get destroyed when I'm shooting at one? Or do I need to do something different, meaning not use instance variables?