Example #1
0
        /// <summary>
        /// Saves game data for the active save file.
        /// </summary>
        /// <returns>True if the save was successful. False otherwise.</returns>
        public static bool Save()
        {
            if (activeSlot != null)
            {
                return(activeSlot.Save());
            }

            return(false);
        }
Example #2
0
        //-------------------------------------------------------------------------
        // Public Interface
        //-------------------------------------------------------------------------

        /// <summary>
        /// Saves game data for a certain save file out to disk.
        /// </summary>
        /// <param name="filename">The name of the save file to save.</param>
        public static bool Save(string filename)
        {
            SaveSlot file = slots.Find((SaveSlot slot) => slot.Name == filename);

            if (file != null)
            {
                return(file.Save());
            }

            return(false);
        }