public void LoadGame() { if (Input.GetKeyDown(KeyCode.P)) { SauvegardeManager.ImportData("newSave.json"); } }
public void SaveGame() { if (Input.GetKeyDown(KeyCode.L)) { Debug.Log(JsonConvert.SerializeObject(m_Inventory)); } if (Input.GetKeyDown(KeyCode.O)) { SauvegardeManager.ExportData("newSave.json"); } }
public void SwitchLevel() { MapGenerator.Coord myPosition = MapGenerator.ConvertWorldToIndex(transform.position); int myActualPosition = GetTile(myPosition.i, myPosition.j); if ((myPosition.i == 2 && myPosition.j == 9) || (myPosition.i == 3 && myPosition.j == 9)) { SceneManager.LoadScene("Game2"); SauvegardeManager.ImportData("GameContentLvl2.json"); } if ((myPosition.i == 2 && myPosition.j == 2) || (myPosition.i == 3 && myPosition.j == 2)) { SceneManager.LoadScene("Game"); SauvegardeManager.ImportData("GameContentLvl1.json"); } }