How to Pause and Unpause Game?
So I made a function that allows the player to hit the "p" key which will change the framerate of the game:
if (keys[80])
{
if(game_paused =="false"){
stage.frameRate = 0;
game_paused = "true";
}
if(game_paused =="true"){
stage.frameRate = 30;
game_paused = "false";
}
}
The problem is, when the key is pressed, the game seems to go at double the framerate, like 60 or maybe even higher than that. I have no clue why, I don't see how making the framerate EQUAL 30 would make it go HIGHER than that... any ideas? Thanks.
