private void OnEnable() { player = FindObjectOfType <NG_Player>(); playerStats = FindObjectOfType <NG_StatManager>(); playerWeapon = FindObjectOfType <NG_Weapon>(); scoreManager = FindObjectOfType <ScoreManager>(); upgradeProgress = FindObjectOfType <NG_UpgradeProgress>(); circleMenu = FindObjectOfType <NG_CircleMenu>(); UpdateValues(); }
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; }
// Use this for initialization void Start() { player = FindObjectOfType <NG_Player>(); playerInput = FindObjectOfType <NG_PlayerInput>(); circleMenu = FindObjectOfType <NG_CircleMenu>(); }
// Use this for initialization void Start() { circleMenu = FindObjectOfType <NG_CircleMenu>(); }