uwp_is_suspending


描述

This function will return true for a single frame (and false otherwise) in a similar manner to os_is_paused(). The game then has one second to save the game state before it is potentially terminated by the system. Once the game has finished saving data it should call uwp_suspend() to suspend cleanly. The game should probably also enter a pause state so that if it is resumed by the system (if it hasn’t been fully terminated) the player is not thrown straight back into a gameplay situation.


语法:

uwp_is_suspending();


返回:

Boolean(布尔值)


例如:

if xboxliveis_suspending()
    {
    scr_Save_Game_Data();
    xboxlivesuspend();
    }

The above code checks to see if the app is going into suspension and if it is it calls a script to save the game data before suspending the game.