// Update is called once per frame void Update() { gameTime += Time.deltaTime; if (Input.GetKeyDown(KeyCode.Space)) { SceneManager.LoadScene("LeaderboardScene"); LeaderboardScript.AddLeaderboardScoreEntry(gameTime, "noot(you)"); } }
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"); }