Exemple #1
0
    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));
    }
Exemple #2
0
    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));
    }
Exemple #3
0
 public static bool Save( )
 {
     return(FileMgr.Save(LevelCharacterController._instance,
                         typeof(LevelCharacterController),
                         ConstantValue.FILE_NAME_NEXTLVEXP, true));
 }
Exemple #4
0
 /// <summary>
 /// Saves all map data.
 /// </summary>
 public void SaveAllMapData()
 {
     FileMgr.Save(_maps, typeof(List <MapInfo>), ConstantValue.FILE_MAPDATA);
 }