public void SaveData() { PlayerPersistance.SaveData(this); }
public void LoadData() { dataStorage = PlayerPersistance.LoadData(); currentHealth = PlayerPrefs.GetInt("health"); experiencePoints = dataStorage.XP; }
private void OnDisable() { DontDestroy(); Debug.Log("Disabled"); PlayerPersistance.SaveData(this); }
private void OnEnable() { Debug.Log("Enabled"); dataStorage = PlayerPersistance.LoadData(); // SelectStartingPoint(); }
public void Save() { PlayerPersistance.SaveInfo(this); }
public void Load() { //StopAllCoroutines(); _playerInfo = PlayerPersistance.LoadInfo(); transform.position = _playerInfo.position; }