summaryrefslogtreecommitdiff
path: root/Assets/Scripts
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2020-04-20 19:08:59 -0400
committerAndrew Lee <alee14498@protonmail.com>2020-04-20 19:08:59 -0400
commitdd117b77aae1d8be7563b360d05b842a73b7dab2 (patch)
treed8ca5ab0b6b6ca32df35558917ce69df3cd4f980 /Assets/Scripts
parent0382584a77aed5dc926909b7dad6159ae0757e38 (diff)
downloadProject-Sandbox-dd117b77aae1d8be7563b360d05b842a73b7dab2.tar.gz
Project-Sandbox-dd117b77aae1d8be7563b360d05b842a73b7dab2.tar.bz2
Project-Sandbox-dd117b77aae1d8be7563b360d05b842a73b7dab2.zip
Upgraded Unity
Diffstat (limited to 'Assets/Scripts')
-rw-r--r--Assets/Scripts/Exit.cs5
-rw-r--r--Assets/Scripts/PlayerMovement.cs4
-rw-r--r--Assets/Scripts/Quit.cs14
-rw-r--r--Assets/Scripts/Quit.cs.meta11
4 files changed, 27 insertions, 7 deletions
diff --git a/Assets/Scripts/Exit.cs b/Assets/Scripts/Exit.cs
index a0feb04..ea092b0 100644
--- a/Assets/Scripts/Exit.cs
+++ b/Assets/Scripts/Exit.cs
@@ -1,6 +1,4 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
+using UnityEngine;
public class Exit : MonoBehaviour
{
@@ -9,7 +7,6 @@ public class Exit : MonoBehaviour
{
if (Input.GetKey("escape"))
{
- Debug.Log("Game is now closed.");
Application.Quit();
}
diff --git a/Assets/Scripts/PlayerMovement.cs b/Assets/Scripts/PlayerMovement.cs
index b0b6874..cf131be 100644
--- a/Assets/Scripts/PlayerMovement.cs
+++ b/Assets/Scripts/PlayerMovement.cs
@@ -1,6 +1,4 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
+using UnityEngine;
public class PlayerMovement : MonoBehaviour
{
diff --git a/Assets/Scripts/Quit.cs b/Assets/Scripts/Quit.cs
new file mode 100644
index 0000000..ea092b0
--- /dev/null
+++ b/Assets/Scripts/Quit.cs
@@ -0,0 +1,14 @@
+using UnityEngine;
+
+public class Exit : MonoBehaviour
+{
+ // Update is called once per frame
+ void Update()
+ {
+ if (Input.GetKey("escape"))
+ {
+ Application.Quit();
+ }
+
+ }
+}
diff --git a/Assets/Scripts/Quit.cs.meta b/Assets/Scripts/Quit.cs.meta
new file mode 100644
index 0000000..87fc2df
--- /dev/null
+++ b/Assets/Scripts/Quit.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 3aa4285199d3f6f3a88d2b5993d8adfd
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant: