示例#1
0
        /// <summary>
        /// Attempts to set the slot to the first unused slot. Useful for creating a new game.
        /// </summary>
        /// <param name="notifyListeners"></param>
        /// <param name="slot"></param>
        /// <returns></returns>
        public static bool SetSlotToNewSlot(bool notifyListeners, out int slot)
        {
            int availableSlot = SaveFileUtility.GetAvailableSaveSlot();

            if (availableSlot == -1)
            {
                slot = -1;
                return(false);
            }
            else
            {
                SetSlot(availableSlot, notifyListeners);
                slot = availableSlot;
                return(true);
            }
        }
示例#2
0
 /// <summary>
 /// Checks if there are any unused save slots.
 /// </summary>
 /// <returns></returns>
 public static bool HasUnusedSlots()
 {
     return(SaveFileUtility.GetAvailableSaveSlot() != -1);
 }