/// <summary>
    /// This deserializses and loads the latest save making it possible to jump back to a previous spawnpoint or continue an already started game
    /// when pressing the load button. This needs testing
    /// </summary>
    public void LoadSave()
    {
        spawner = GameManager.managerWasa.RespawnManage; // current solution will be replaced when respawnsystem is rewamped to higher level in hierarchy
        RepawnInsans inst = SaveAndLoad.LoadGameData();  // create respawninstance that is used for loading the game

        spawner.RespwnNow(inst);                         // calls the respawn now function of the respawnmanager
        Resume();                                        // resumes game to where it was for a little while ago.
    }
Example #2
0
    /// <summary>
    /// Loads an old save using the Static save and loadscripts function for loading an old savefile
    /// </summary>
    public void LoadOldGame()
    {
        oldsave = SaveAndLoad.LoadGameData();

        foreach (string s in oldsave.LoadedLevel)
        {
            GameManager.managerWasa.LoadScene(s);
            GameManager.managerWasa.Audio.StartPlayingNewTrack(s);
        }

        StartCoroutine(loadDelay());
    }