/// <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. }
IEnumerator loadDelay() { yield return(new WaitForSecondsRealtime(1)); GameManager.managerWasa.UnPausGame(); spwn.RespwnNow(oldsave); GameManager.managerWasa.UnloadScene("MainMenue"); }