Example #1
0
    private void Start()
    {
        score    = FindObjectOfType <Score>();
        maxScore = score.Peek();

        text      = GetComponent <TextMesh>();
        text.text = "00000000"; // 8 digits

        dimmer = GameObject.Find("Dimmer").GetComponent <MeshRenderer>();

        audio = GetComponent <AudioSource> ();

        highscoreText = transform.GetChild(1).GetComponent <TextMesh>();

        particles = GetComponent <ParticleSystem>();

        var manager = FindObjectOfType <ScoreManager>();

        CmdGetLevel();
        manager.Load(level);
        highscore          = manager.GetScore(level);
        highscoreText.text = "HIGHSCORE: " + highscore;

        BackgroundMusic.OnScoreEnter();
    }