Beispiel #1
0
    private void Load()
    {
        byte[] save = File.ReadAllBytes(GameStateModel.GetSaveLocation(selectedPath));
        byte[] meta = File.ReadAllBytes(GameStateModel.GetSaveMetaLocation(selectedPath));

        inst_boot.RebootGameWithData(GameStateModel.Deserialize <GameStateModel>(save),
                                     GameStateModel.Deserialize <GameStateModel.SaveMeta>(meta));
    }
Beispiel #2
0
 private void Load()
 {
     if (checkDialog.IsOpen)
     {
         checkDialog.CloseDialog();
     }
     byte[] save = File.ReadAllBytes(GameStateModel.GetSaveLocation(selectedPath));
     byte[] meta = File.ReadAllBytes(GameStateModel.GetSaveMetaLocation(selectedPath));
     //TODO : Bootstrap 같은 형식으로 Boot 클래스가 필요함.
     BootstrapManager.getInstance().RebootGameWithData(GameStateModel.Deserialize <GameStateModel>(save),
                                                       GameStateModel.Deserialize <GameStateModel.SaveMeta>(meta));
     CloseMenu();
 }
Beispiel #3
0
    private GameStateModel.SaveMeta CheckMetaFile(string name)
    {
        string path = GameStateModel.GetSaveMetaLocation(name);

        byte[] metaData = null;
        try
        {
            metaData = File.ReadAllBytes(path);
            return(GameStateModel.Deserialize <GameStateModel.SaveMeta>(metaData));
        }
        catch
        {
            return(null);
        }
    }
Beispiel #4
0
    void Awake()
    {
        bool file01 = File.Exists(GameStateModel.GetSaveMetaLocation(SaveLoadConst.FILE01NAME));
        bool file02 = File.Exists(GameStateModel.GetSaveMetaLocation(SaveLoadConst.FILE02NAME));
        bool file03 = File.Exists(GameStateModel.GetSaveMetaLocation(SaveLoadConst.FILE03NAME));

        continueAvailable = file01 || file02 || file03;
        if (continueAvailable)
        {
            ContinueAvailable();
        }
        else
        {
            BrandNewStart();
        }
    }