flipnSink95
Member
|
Pausing
So for my game I'm making, which will not only have single player but multiplayer as well, I'm wondering about pausing it for single player, and so it brings me to the question, how can I pause things?
I'm thinking of doing so by looping through a list of objects in the world that have animations and such, and by freezing them. How do I do this? That is if this is the best way to go about it.
|
|
11-30-2010 02:33 PM |
|
Yurci
Member
|
RE: Pausing
In GameUpdate()
if (MenuTab.window.hidden() || Sysinformation.window.hidden() || Options.window.hidden() || InformationPopup.window.hidden() )
{
//Everything u wanna update if menus are hidden
Clouds.layered.update();
Game::World.update(Cam.matrix.pos);
Water.update(Vec2(0.01));
UpdateCamera();
SUN_update();
}
(This post was last modified: 11-30-2010 03:40 PM by Yurci.)
|
|
11-30-2010 03:39 PM |
|
gwald
Member
|
RE: Pausing
Hello,
I know this is old..
I want to pause the game play, which the Yurci's post works fine for that.
But it also pauses the GUI.
Is there anyway of pausing the gameplay and not the GUI?
update, I'll add
Gui.draw();
I'm sure that'll work
My Blog
http://www.esenthel.com/community/showthread.php?tid=6043
I hang out at Esenthel IRC Channel
http://webchat.freenode.net/?channels=#Esenthel
(This post was last modified: 03-07-2013 10:31 AM by gwald.)
|
|
03-07-2013 10:11 AM |
|
Tottel
Member
|
RE: Pausing
Make sure you add the GUI.Update() outside of the if-structure.
|
|
03-07-2013 11:05 AM |
|
gwald
Member
|
RE: Pausing
Thanks Tottel, that worked
But it didn't stop my AI lol
So, it's just easier stopping the chr and AI
Ah game dev is fun
My Blog
http://www.esenthel.com/community/showthread.php?tid=6043
I hang out at Esenthel IRC Channel
http://webchat.freenode.net/?channels=#Esenthel
|
|
03-07-2013 12:24 PM |
|