예제 #1
0
    private void autosave()
    {
        //Debug.Log("autosaving");
        SavedState autosave = new SavedState();

        autosave.setFromGameManager();
        // autosave.name = "autosave";
        autosave.players    = tm.currentState();
        autosave.objectives = objmanager.currentState();
        autosave.checkPoint = checkpointManager.GetCheckPoint(this);
        autosave.date       = System.DateTime.Now.ToString();
        autosave.saveSlot   = 6;
        if (finalCheckpoint && objmanager.LevelComplete())
        {
            autosave.level++;
            autosave.checkPoint = 0;
        }
        SaveLoad.Save(autosave, 6);
        gm.autosave = autosave;
    }
예제 #2
0
    public void SaveGame(int slot)
    {
        //Debug.Log("in save game");
        //   saveScreen.enabled = false;
        SavedState toSave = new SavedState();

        toSave.setFromGameManager();
        toSave.players    = tm.currentState();
        toSave.objectives = objmanager.currentState();
        toSave.checkPoint = checkpoint;
        toSave.saveSlot   = slot;
        toSave.level      = gm.level;
        toSave.date       = System.DateTime.Now.ToString();
        if (finalCheckpoint && objmanager.LevelComplete())
        {
            toSave.level++;
            toSave.checkPoint = 0;
        }
        SaveLoad.Save(toSave, slot);
        SaveLoad.setSaveButton(slots[slot - 1]);
        SavedSuccessfully();
    }