- what would you have HandleInput() do within an individual Object::Update?
That depends on the object.. Generally you have an ObjectManager that contains a list of Object*.
Then you have other objects that derive from the parent object and do different things.
Something like this (untested code):
class Animal
{
public: virtual void Talk() = 0;
};
class Cat : public Animal
{
public: void Talk() { say( "Meow" ); }
};
class Dog : public Animal
{
public: void Talk() { say( "Woof" ); }
};
class Bird : public Animal
{
public: void Talk() { say( "Chirp" ); }
};
class AnimalManager
{
public:
Add( Animal* _animal ) { m_Animals.push_back( _animal ); }
AllTalk()
{
for( int i = 0; i < m_Animals.size(); ++i )
m_Animals[i]->Talk();
}
private:
std::vector<Animal*> m_Animals;
};
int main()
{
Cat cat;
Dog dog;
Bird bird;
AnimalManager mgr;
mgr.Add(&cat);
mgr.Add(&dog);
mgr.Add(&bird);
mgr.AllTalk();
return 0;
}
- what are some examples of what m_Events.Update() might include?
Simple Event System
- If opjects are being moved one at a time, where would collisions be handled? Would that be within m_ObjectManager.Update after all the individual Object::Update methods have been called?
Different people handle it different ways. Some people move the collision check out of the object and make it part of the object manager. Some people do it through events, and keep track of objects they've collided with that frame so that they don't multiply collide. There are other solutions as well. Do a little Googling and find a solution that works for you.

Find content
Male
