Example #1
0
    //获取存档信息
    public static GameData getData(string ID = "0")
    {
        //读取信息
        FileOperater fileOp   = new FileOperater();
        string       fileName = Application.persistentDataPath + "/GameData" + ID + ".sav";
        GameData     theData  = fileOp.loadBinary(fileName);

        return(theData);
    }
Example #2
0
    public static bool LoadInformation(string ID = "0")
    {
        //读取信息
        FileOperater fileOp   = new FileOperater();
        string       fileName = Application.persistentDataPath + "/GameData" + ID + ".sav";
        GameData     theData  = fileOp.loadBinary(fileName);

        //存档校验
        if (theData == null)
        {
            return(false);
        }

        SystemValues.theSaveData = theData;
        UIController.GetInstance().ShowUI <UILoading> (theData.SceneName);
        return(true);
    }