aboutsummaryrefslogtreecommitdiff
path: root/Assets/Scripts/Quit.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Assets/Scripts/Quit.cs')
-rw-r--r--Assets/Scripts/Quit.cs21
1 files changed, 21 insertions, 0 deletions
diff --git a/Assets/Scripts/Quit.cs b/Assets/Scripts/Quit.cs
new file mode 100644
index 0000000..3faba95
--- /dev/null
+++ b/Assets/Scripts/Quit.cs
@@ -0,0 +1,21 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+public class Quit : MonoBehaviour
+{
+ // Update is called once per frame
+ void Update()
+ {
+ if (Input.GetKey("escape"))
+ {
+#if UNITY_STANDALONE
+ Application.Quit();
+#endif
+ /*
+#if UNITY_EDITOR
+ UnityEditor.EditorApplication.isPlaying = false;
+#endif*/
+ }
+ }
+}