Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void OnGUI()
- {
- GUI.skin.label.fontSize = 20;
- GUI.skin.label.alignment = TextAnchor.MiddleLeft;
- GUI.Label(new Rect(10, 10, 200, 30), "Time: " + (Time.time - startTime).ToString("#.#"));
- GUI.Label(new Rect(10, 40, 200, 30), "Treasures: " + collected + "/" + numTreasures);
- if (levelComplete)
- {
- Cursor.visible = true;
- Cursor.lockState = CursorLockMode.None;
- if (LevelEndMessage("Level Completed!", "Continue"))
- {
- SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);
- }
- }
- else if (player == null)
- {
- SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment