// Use this for initialization public void ContinueSession() { //continue session int bookmark = PlayerPrefs.GetInt("sessionBookmark", 0); sceneLoader.LoadSceneNamed(sceneNames[bookmark]); }
public void dispatchSquad() { //Debug.Log("dispatching Squad"); //check if party is filled //load combat if yes bool partyFull = true; foreach (int i in activeChara) { if (i == -1) { partyFull = false; } } if (partyFull) { //save, reset session, load next scene for (int i = 0; i < 3; i++) { PlayerChara pchara = playerLoader.allPlayerChara[activeChara[i]].GetComponent <PlayerChara>(); pchara.chara.Initialize(); playerLoader.PlayerCharaSave(i, pchara); } PlayerPrefs.DeleteKey("sessionDetails"); PlayerPrefs.DeleteKey("enemyDetails"); PlayerPrefs.SetInt("item01", 3); PlayerPrefs.SetInt("item02", 3); PlayerPrefs.SetInt("item03", 3); PlayerPrefs.SetInt("item04", 3); //Debug.Log("Passed deletion, loading now"); //sceneLoader.LoadSceneNamed("Combat_Test"); sceneLoader.LoadSceneNamed("Combat"); } }