From dd117b77aae1d8be7563b360d05b842a73b7dab2 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Mon, 20 Apr 2020 19:08:59 -0400 Subject: Upgraded Unity --- Assets/Scripts/Quit.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Assets/Scripts/Quit.cs (limited to 'Assets/Scripts/Quit.cs') 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(); + } + + } +} -- cgit v1.2.3