문제

I have a question regarding the pausing/freezing a game while a window/pausemenu will appear at center of the screen. I've already created a pausescreen class which will be called each time the back key is being pressed.

My problem is that I don't know how to freeze or put the game to pause, this becomes a problem because whenever i tried to click on the outsides of the pause window the player could move around.

도움이 되었습니까?

해결책

superjumper code

follow this link . You will find a gameScreen , there they have specified game state which is responsible for pausing and resuming the game. Read it and your problem will be solved.

다른 팁

All you need is to check current game state in render() function. Here is sample solution: libgdx game how to display pause screen when user click on pause icon

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top