Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualServant of the Lord

Posted 16 December 2012 - 11:25 AM

Use a vector:
std::vector<MyEnemy> enemies;

When you are ready to create a new one, call:
enemies.push_back(MyEnemy(model, animation, position, rotation, scale, etc...);

When drawing or updating enemies, you iterate over the entire vector.

#1Servant of the Lord

Posted 16 December 2012 - 11:25 AM

Use a vector:
std::vector<MyEnemy> enemies;

When you are ready to create a new one, call:
enemies,push_back(MyEnemy(model, animation, position, rotation, scale, etc...);

When drawing or updating enemies, you iterate over the entire vector.

PARTNERS