private void Start() { playerStats = FindObjectOfType <NG_StatManager>(); upgradeMenu = FindObjectOfType <NG_UpgradeMenu>(); circleMenu = FindObjectOfType <NG_CircleMenu>(); score = FindObjectOfType <ScoreManager>(); if (score == null) { Debug.Log("ScoreManager didn't load between scenes."); } highestShards = score.shardCount; highestHealth = playerStats.Health.MaxVal; highestEnergy = playerStats.Energy.MaxVal; highestLives = playerStats.MaxLives; }
private void Update() { //highestShards = score.shardCount; //tempShards = highestShards; if (score == null) { Debug.Log("ScoreManager didn't load between scenes."); //highestShards = tempShards; } if (Input.GetKeyDown(KeyCode.Alpha0)) { highestShards += 8; } upgradeMenu = FindObjectOfType <NG_UpgradeMenu>(); circleMenu = FindObjectOfType <NG_CircleMenu>(); score.shardCount = highestShards; }