How do you exit an application in CocosSharp?

2019-09-20 04:05发布

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.

标签: cocossharp
2条回答
ゆ 、 Hurt°
2楼-- · 2019-09-20 04:23

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

查看更多
甜甜的少女心
3楼-- · 2019-09-20 04:24

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.

查看更多
登录 后发表回答