Esempio n. 1
0
    // Update is called once per frame
    void Update()
    {
        gameTime += Time.deltaTime;

        if (Input.GetKeyDown(KeyCode.Space))
        {
            SceneManager.LoadScene("LeaderboardScene");
            LeaderboardScript.AddLeaderboardScoreEntry(gameTime, "noot(you)");
        }
    }
Esempio n. 2
0
    public void GameOver()
    {
        CountDownDisplay timer       = GetComponentInChildren <CountDownDisplay>();
        float            currentTime = timer.currentTime;
        float            maxTime     = timer.initalTime;
        float            score       = maxTime - currentTime;
        string           name        = "You";

        LeaderboardScript.AddLeaderboardScoreEntry(score, name);
        SceneManager.LoadScene("LeaderboardScene");
    }