mirror of
https://github.com/Steffo99/keep-everything-alive.git
synced 2024-11-24 02:14:17 +00:00
Restart on Game Over
This commit is contained in:
parent
ccc8c67c81
commit
e34322cee5
1 changed files with 9 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class GameController : MonoBehaviour
|
||||
{
|
||||
|
@ -172,4 +173,12 @@ public class GameController : MonoBehaviour
|
|||
|
||||
StartCoroutine("SpinTheWheel");
|
||||
}
|
||||
|
||||
private void Update() {
|
||||
if(GameOver) {
|
||||
if(Input.anyKeyDown) {
|
||||
SceneManager.LoadScene("Default");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue