Jump to content

Close phaser app


Castellvi
 Share

Recommended Posts

This may be a silly question, but I've been searching and I coldn't find nothing. 

I just want to add a button on my game main menu to exit my app, what do I have to call on phaser to do this? I've been searching in the documentation of Phaser.Game and Phaser.StateManager, but nothing seems to do this :/

 

Thanks!

Link to comment
Share on other sites

What do you mean exit the game? I suppose you are using some kind of platform? Like Cordova/Phonegap or something similar?

 

Also your game is viewed on a mobile device?

 

Because for a web-game, I would say going back to some state like menu or an intro would equal a "close".

Link to comment
Share on other sites

Thank you MichaelD for your answer, I forgot to specify it, I'm using Cocoonjs to build de project, and the project is menat to be for android and ipad tablets.

 

In my main menu I have some buttons like "start game" and "Exit", I want the "Exit" button to close the app. In android you can use the default navigation bar to do this, but not with the ipad.

Also, when I'm playing the the game (not in the main menu) and I press the "Back" button of the android navigation bar, it exits the game, and I'd like it to go back to the Main Menu while in game.

 

Hope that I've explained it more clearly, thanks.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...