How do you exit an application in CocosSharp?

2019-09-20 04:12发布

问题:

I am trying to add "Exit Game" functionality in my CocosSharp game (for Windows phone) but I am unable to find any sample code/ guidance online. Any pointers would be welcome.

User should be able to quit the game by pressing a button image on the screen.

回答1:

Mobile apps are not closed.

They run forever unless they crash, are forced closed by the user, or are shut down by the OS to free up resources.

It's not to say you cannot invoke a system call to exit your program but it is simply not the implementation that is done in modern mobile development.



回答2:

Well, simply by looking at intellisense i found ExitGame() method on CCApplication instance.



标签: cocossharp