Example #1
0
    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;
    }
Example #2
0
    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;
    }