示例#1
0
 /// <summary>
 /// When app is paused (e.g., minimized) and saveOnPause is true, save game.
 /// </summary>
 /// <param name="paused">True indicates game is being paused.</param>
 private void OnApplicationPause(bool paused)
 {
     if (enabled && paused && saveOnPause && CanSaveInThisScene())
     {
         SaveSystem.SaveToSlotImmediate(saveSlotNumber);
     }
 }
示例#2
0
 /// <summary>
 /// When app loses focus and saveOnLoseFocus is true, save the game.
 /// </summary>
 /// <param name="focusStatus">False indicates game is losing focus.</param>
 void OnApplicationFocus(bool focusStatus)
 {
     if (enabled && saveOnLoseFocus && focusStatus == false && CanSaveInThisScene())
     {
         SaveSystem.SaveToSlotImmediate(saveSlotNumber);
     }
 }
示例#3
0
 private void CheckSaveOnQuit()
 {
     if (enabled && saveOnQuit && CanSaveInThisScene())
     {
         SaveSystem.SaveToSlotImmediate(saveSlotNumber);
     }
 }