Vector<Enemies> moving enemies

I have an Enemy class. I am loading the enemies into a vector. The enemies all do the same thing. Move to the same place.

How would I implement they move from one side of the screen to another?
Basically a delay between each element in the vector.

How to implement this?

If I just said move(x, y), they would all move at the same time at the same speed and therefore all be overlayed over one another so you would only see one enemy.
You could give each enemy it's own speed
They should all have the same speed as well
If I just said move(x, y), they would all move at the same time at the same speed
They should all have the same speed as well

Not sure what you actually mean.
Do you want them to move at different times ?
I guess you move them in a loop.
Maybe add a little delay after it has been moved.
Yes I would like them to move at different times.
How to add the delay is what I am after?
std::this_thread::sleep_for is one option.
http://www.cplusplus.com/reference/thread/this_thread/sleep_for/
Topic archived. No new replies allowed.