Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by danicor

If I create a pause screen with a menu and execute the next code:

ig.system.setGame (BasketPause);

You can exit the pause screen and return to the game screen? I have to create the pause screen in another way?

Thanks to all

1 decade ago by stillen

If you set a new game, you will quit the current game.

If this is a HTML only game, not an ejecta game, you can overlay a pause div in html and stop the game loop. This would stop the game. The within the pause div you can have a button that starts the game loop. You can also bind to the focus and blur events too. There are a few plugins that make this easier if you are new to JS and Impact.

If this is an ejecta game, the pause screen is harder because you don't have access to dom objects like a normal HTML page. Also in ejecta the game pauses in the background already.

1 decade ago by danicor

I did it with a pause plugin (http://www.pointofimpactjs.com/plugins/view/45/pause) and drawing all elements of the pause screen in the same instance as the game. Everything works properly.

I think it is always the best option to do everything inside the canvas, but for textboxs it was impossible to find a good solution.

Thx
Page 1 of 1
« first « previous next › last »