summaryrefslogtreecommitdiff
path: root/Assets/Scripts/Exit.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Assets/Scripts/Exit.cs')
-rw-r--r--Assets/Scripts/Exit.cs17
1 files changed, 17 insertions, 0 deletions
diff --git a/Assets/Scripts/Exit.cs b/Assets/Scripts/Exit.cs
new file mode 100644
index 0000000..a0feb04
--- /dev/null
+++ b/Assets/Scripts/Exit.cs
@@ -0,0 +1,17 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+public class Exit : MonoBehaviour
+{
+ // Update is called once per frame
+ void Update()
+ {
+ if (Input.GetKey("escape"))
+ {
+ Debug.Log("Game is now closed.");
+ Application.Quit();
+ }
+
+ }
+}