Added a bunch of stuff
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user