I just have a quick question about sprites and instances of them.
I have an enemy Sprite and it follows a path, every 2 seconds another one spawns. In the container of the sprite I have a red and green bar that will show the health above each of the sprites. Every tick it moves the bar along with the sprite.
The bar follows each sprite but the problem is when I do the calculation to make the width of the green bar smaller (set the width of the green bar when a bullet collides with the sprite), it makes all of the green bars smaller, not just that instance of it.
Am I missing something? I thought since it was just that instance of the container it should be only changing the width of the one that was collided with correct?