示例#1
0
    public static void OnGameOver()
    {
        if (self == null)
        {
            return;
        }
        self.canvas.SetActive(true);
        self.GetComponent <AudioSource>().Play();

        self.textField.text = "You got a score of " + CoinCounter.GetCoins() + " and took " + TimerController.GetTime() + " Minutes!";
    }
示例#2
0
    void OnTriggerEnter2D(Collider2D col)
    {
        if (col.tag != "Player")
        {
            return;
        }
        time   = TimerController.GetTimeRaw();
        coins  = CoinCounter.GetCoins();
        health = PlayerController.GetHealth();

        SceneManager.sceneLoaded += OnSceneLoaded;
        SceneManager.LoadScene(levelName);
    }