示例#1
0
        public void SaveImmediately(ProfileComponents components)
        {
            Debug.Log("PROFILE: Saving profile " + components.ToString() + " immediately");
            if (Flags.Check((uint)components, (uint)ProfileComponents.Preferences, Flags.CheckType.MatchAny))
            {
                GameData.IO.SavePreferences(Current.Name, CurrentPreferences);
            }

            if (Flags.Check((uint)components, (uint)ProfileComponents.Game, Flags.CheckType.MatchAny))
            {
                //save the whole world
                CurrentGame.LastTimeSaved  = DateTime.Now;
                CurrentGame.GameTimeOffset = WorldClock.AdjustedRealTimeWithoutOffset;
                GameData.IO.SaveGame(CurrentGame);
            }
            else if (Flags.Check((uint)components, (uint)ProfileComponents.Character, Flags.CheckType.MatchAny))
            {
                //just save the character
                //don't bother with the rest of the world
                CurrentGame.LastTimeSaved  = DateTime.Now;
                CurrentGame.GameTimeOffset = WorldClock.AdjustedRealTimeWithoutOffset;
                GameData.IO.SaveGame(CurrentGame);
            }

            if (Flags.Check((uint)components, (uint)ProfileComponents.Profile, Flags.CheckType.MatchAny))
            {
                GameData.IO.SaveProfile(Current);
            }
        }
示例#2
0
 public void SaveCurrent(ProfileComponents components)
 {
     Debug.Log("PROFILE: Saving current " + components.ToString());
     //GameData.IO.LogPaths();
     mSaveNextAvailable |= components;
     enabled             = true;
 }