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