Added a restart button
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class GMScript : MonoBehaviour
|
||||
{
|
||||
@@ -41,6 +42,10 @@ public class GMScript : MonoBehaviour
|
||||
void Update()
|
||||
{
|
||||
|
||||
if (Input.GetKeyDown("r")) {
|
||||
SceneManager.LoadScene("Scene");
|
||||
}
|
||||
|
||||
time += Time.deltaTime;
|
||||
obstacleTime += Time.deltaTime;
|
||||
enemyTime += Time.deltaTime;
|
||||
|
||||
Reference in New Issue
Block a user