nord666
12-06-2008 04:35:32
Hi!
I'm not sure if the way i'm "pausing" my game is a good one. So, i want you opinion.
Firstly, i initialyse the BodyIterator.
Secondly, i call a function according to the "pausing state".
The two functions:
I'm almost sure that the way i do it isn't good. But it's the only one that i found.
If you have a better way, can you give it to me please.
Thank and sorry for my English!
I'm not sure if the way i'm "pausing" my game is a good one. So, i want you opinion.
Firstly, i initialyse the BodyIterator.
OgreNewt::BodyIterator::getSingleton().Init(mWorld);
Secondly, i call a function according to the "pausing state".
if (!paused)
OgreNewt::BodyIterator::getSingleton().go(pause);
else
OgreNewt::BodyIterator::getSingleton().go(unpause);
paused = !paused;
The two functions:
void pause(OgreNewt::Body * _body)
{
_body->freeze();
}
void unpause(OgreNewt::Body * _body)
{
_body->unFreeze();
}
I'm almost sure that the way i do it isn't good. But it's the only one that i found.
If you have a better way, can you give it to me please.
Thank and sorry for my English!