public void Quit() { SoundManager.instance.PlaySound(SoundType.Tap); SystemSave.SaveGameManager(); #if UNITY_EDITOR UnityEditor.EditorApplication.isPlaying = false; #else Application.Quit(); #endif }
public void LoadPlayer() { PlayerData data = SystemSave.LoadPlayer(); health = data.health; Vector3 position; position.x = data.position[0]; position.y = data.position[1]; position.z = data.position[2]; transform.position = position; }
// Start is called before the first frame update public void LoadGame() { PlayerData player = SystemSave.LoadDataPlayer(); if (player == null) { return; } Vector2 a = new Vector2(player.GetPotion(0), player.GetPotion(1)); transform.position = new Vector3(a.x, a.y, transform.position.z); Jumps = player.GetJump(); falls = player.GetFall(); }
public void LoadGameSave() { try { PlayerData data = SystemSave.LoadDataPlayer(); if (data == null) { return; } SceneManager.LoadScene(2); return; } catch (Exception e) { return; } }
void Init() { //set all default value nbStar = new int[allLevel]; for (int i = 0; i < nbStar.Length; i++) { nbStar[i] = 0; } //load and set save value GameManager loadGameManager = SystemSave.LoadGameManager(); if (loadGameManager != null) { unlockLevel = loadGameManager.unlockLevel; for (int i = 0; i < loadGameManager.nbStar.Length; i++) { nbStar[i] = loadGameManager.nbStar[i]; } } }
public void SavePlayer() { SystemSave.SavePlayer(this); }
public void SaveData() { SystemSave.SaveDataPlayer(this, Jumps, falls); }
public void DeleteSaveGame() { SystemSave.DeleteSavedGame(); }