//Should launch at the beginning of every scene public void ReloadScene() { if (GameObject.FindGameObjectWithTag("Player") != null) { Player = GameObject.FindGameObjectWithTag("Player"); PlayerStats = Player.GetComponent <PlayerStatManager>(); if (NewGame) { PlayerStats.SetBase(); _saveData.SaveStats(PlayerStats); NewGame = false; } else { _saveData.LoadStats(ref PlayerStats); } } }
private void Awake() { _stats = GetComponent <PlayerStatManager>(); _rb = GetComponent <Rigidbody>(); _stats.SetBase(); }