I am unsure which method to use to handle my enemies in SFML.
The idea that I am trying to recreate is to spawn enemies every so many seconds. Initially I wanted to do this using a vector such as std::vector SpriteVector; The advantages of this method would be that in theory it is easy to add and remove my enemies from the vector. Using the push_back and erase method.
However the error with this at the moment is that when I am trying to check whether the sprite or the arrows are hitting an enemy within my vector it will not work.
I know that I could possibly use an array to store the enemies then set their state when hit to false however I am not sure how this will effect spawning my enemies. The functionality of being able to add to a vector is what I think I will need. Otherwise I am sure not sure how to get around the issue of having a certain number of enemies within the array then spawning more over a series of time.
Is this the best way to go about the task I am trying to achieve?