1
General / event loop in multiple places? :S
« on: July 27, 2015, 05:07:13 pm »
okay, so im writing a super basic engine, with a statemanager.
this is basically what happends right now:
i can't just make a event loop in GameStateGame. tried it.
Any tips?
there are some solutions i've come up with but i would like some pointers...
solution 1:
solution 2:
Thankyou
this is basically what happends right now:
void CEngine::Update()
{
// Code for event loop, ( close application )
CStateMachine::GetInstance().Update();
Draw();
}
in GameStateGame, lets say i have a character, i need to do keyboard check for movement.{
// Code for event loop, ( close application )
CStateMachine::GetInstance().Update();
Draw();
}
i can't just make a event loop in GameStateGame. tried it.
Any tips?
there are some solutions i've come up with but i would like some pointers...
solution 1:
(click to show/hide)
solution 2:
(click to show/hide)