简体   繁体   中英

Exit XNA Game in Windows Phone 8

I am working on XNA (Mono) game in Windows Phone 8. Once player dead, I need to exit the game and navigate to another XAML page. I tried game.Exit();. But it is exiting the entire application. Is this the actual behavior of Exit method in XNA game?

Or am i supposed to use any other way to exit a game?

Add a new page to your project and navigate to it using NavigationService:

NavigationService.Navigate(new Uri("/PageName.xaml", UriKind.Relative));

Your new page doesn't have to be an XNA page- you can mix those with "normal" Windows Phone Pages and use built-in controls.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM