From 0382584a77aed5dc926909b7dad6159ae0757e38 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Mon, 20 Apr 2020 13:23:57 -0400 Subject: Added jumping and gun (not functional) --- Assets/Scripts/Exit.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Assets/Scripts/Exit.cs (limited to 'Assets/Scripts/Exit.cs') 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(); + } + + } +} -- cgit v1.2.3