示例#1
0
 public void SaveData()
 {
     PlayerPersistance.SaveData(this);
 }
示例#2
0
 public void LoadData()
 {
     dataStorage      = PlayerPersistance.LoadData();
     currentHealth    = PlayerPrefs.GetInt("health");
     experiencePoints = dataStorage.XP;
 }
示例#3
0
 private void OnDisable()
 {
     DontDestroy();
     Debug.Log("Disabled");
     PlayerPersistance.SaveData(this);
 }
示例#4
0
 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;
 }