1
Fork 0
mirror of https://github.com/Steffo99/keep-everything-alive.git synced 2024-11-27 19:44:18 +00:00

Restart on Game Over

This commit is contained in:
Steffo 2020-04-19 18:12:45 +02:00
parent ccc8c67c81
commit e34322cee5

View file

@ -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");
}
}
}
}