This repository has been archived on 2026-04-30. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
monsterstalker/Assets/Scripts/GameOverController.cs
T
2018-04-10 23:53:49 +10:00

23 lines
461 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
public class GameOverController : MonoBehaviour {
public Text scoreText;
void Update() {
if (Input.GetButtonDown ("Quit")) {
Application.Quit ();
}
if (Input.GetMouseButtonDown(0)) {
SceneManager.LoadScene ("gameplay");
}
//update the texts
scoreText.text = "Score: " + PersistentData.score;
}
}