public static bool Save(Player player) { string sPath = string.Format(ConstantValue.FILE_NAME_PLAYER, player.PAccount.UserID); PlayerPrefs.SetInt(ConstantValue.PREFS_LAST_USER_ID, (int)player.PAccount.UserID); PlayerPrefs.Save(); return(FileMgr.Save(player, typeof(Player), sPath)); }
public static bool Save(Character character, string sForceFilePath = "") { string sPath = ""; bool bForcePath = !string.IsNullOrEmpty(sForceFilePath); if (!bForcePath) { sPath = string.Format(ConstantValue.FILE_NAME_CHARACTER, character.PInfoStats.UID); } else { sPath = sForceFilePath; } return(FileMgr.Save(character, typeof(Character), sPath, bForcePath)); }
public static bool Save( ) { return(FileMgr.Save(LevelCharacterController._instance, typeof(LevelCharacterController), ConstantValue.FILE_NAME_NEXTLVEXP, true)); }
/// <summary> /// Saves all map data. /// </summary> public void SaveAllMapData() { FileMgr.Save(_maps, typeof(List <MapInfo>), ConstantValue.FILE_MAPDATA); }