Beispiel #1
0
    // Update is called once per frame
    void Update()
    {
        if (player == null || spawner == null)
        {
            player  = GameObject.FindObjectOfType <PlayerStatsManager>();
            spawner = GameObject.FindObjectOfType <WaveSpawner>();
        }


        if (SceneManager.GetActiveScene().buildIndex == 1)
        {
            playerScore = player.getCurrentScore();
            waveCount   = spawner.getCurrentWave();
        }
        Debug.Log(playerScore + ", " + waveCount);
    }