timer won't start
Posted: Fri Oct 30, 2009 10:19 am
hi, i tried to pause the game using timer like the code below
the game will stop but when i press key to start (key B).. it won't start again.
can anybody tell me how to start the timer or i shoud use another way to pause the game??
Code: Select all
driver->beginScene(true, true, video::SColor(255,0,0,0));
smgr->drawAll();
if ( receiver.IsKeyDown(irr::KEY_KEY_U))
{
device->getTimer()->stop();
}
if ( receiver.IsKeyDown(irr::KEY_KEY_B))
{
device->getTimer()->start();
}
driver->endScene();
can anybody tell me how to start the timer or i shoud use another way to pause the game??