Example #1
0
    // Update is called once per frame
    public void GameOver()
    {
        if (Score.score >= 20 && Score.score <= 49)
        {
            silverCoin.SetActive(true);
        }
        else if (Score.score >= 50)
        {
            goldCoin.SetActive(true);
        }

        gameOverCanvas.SetActive(true);
        scoreCanvas.SetActive(false);
        Time.timeScale = 0;
        FlyLittleBird.playSound("hit");
    }
Example #2
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     Score.score++;
     FlyLittleBird.playSound("point");
 }