Ejemplo n.º 1
0
    public static void TurnOnOff(bool setActive, string gameState = "GAME OVER")
    {
        BeatManager.StopMusic();
        instance.gameObject.SetActive(setActive);
        instance.enabled = true;
        Debug.Log("We are scoreer");
        if (setActive)
        {
            //FindObjectOfType<PlayerEngine>().gameObject.SetActive(false);

            BeatManager.StopMusic();
            RoundController.PauseRound(true);
            instance.gameState.text     = gameState;
            instance.CurrentScore.text  = StreakCounterUI.scoreToPrint.ToString();
            instance.EnemyKills.text    = RoundController.EnemiesKilled.ToString();
            instance.SyncedHits.text    = StreakCounterUI.HitsOnBeat.ToString();
            instance.BestHitStreak.text = StreakCounterUI.TopHitsInArow.ToString();
            instance.Deaths.text        = StreakCounterUI.DeathCount.ToString();

            instance.scoreToPrintScore  = StreakCounterUI.scoreToPrint;
            instance.topHitsScore       = StreakCounterUI.TopHitsInArow; //
            instance.enemiesKileldScore = RoundController.EnemiesKilled; //
            instance.hitsOnBeatScore    = StreakCounterUI.HitsOnBeat;    //
            instance.deathcountScore    = StreakCounterUI.DeathCount;    //
            instance.Invoke("CalculateScore", 0.5f);
        }
    }