Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualfrob

Posted 30 November 2012 - 02:30 PM

The hierarchy manager could also have search functions. For example, I have frequently seen functions similar to this:

std::list<GameObjects*> manager::FindAllObjects( predicate testFunction );
std::list<GameObjects*> manager::FindAllObjectsInRadius(float range);
std::list<GameObjects*> manager::FindAllObjectsOfType(objectType type);
std::list<GameObjects*> manager::FindAllObjectsOfTypeInRadius(objectType type, float range);

and so on. The list of search functions tends to grow as the engine matures.

#1frob

Posted 30 November 2012 - 02:27 PM

The hierarchy manager could also have search functions. For example, I have frequently seen functions similar to this:

std::list<GameObjects*> manager::FindAllObjects();
std::list<GameObjects*> manager::FindAllObjectsInRadius(float range);
std::list<GameObjects*> manager::FindAllObjectsOfType(objectType type);
std::list<GameObjects*> manager::FindAllObjectsOfTypeInRadius(objectType type, float range);

PARTNERS