diff options
| author | Andrew Lee <alee14498@protonmail.com> | 2025-08-03 14:44:16 -0400 |
|---|---|---|
| committer | Andrew Lee <alee14498@protonmail.com> | 2025-08-03 14:44:16 -0400 |
| commit | 84b6cb604310399529a695a421a85af700bbb796 (patch) | |
| tree | c9a140ea82511515d812165c7eb6f9d439ac4d58 /Assets/Scripts/Quit.cs | |
| parent | 4d0cfd3641c3a5cb7c4bccfbad0476e366324524 (diff) | |
| download | prototype-a-84b6cb604310399529a695a421a85af700bbb796.tar.gz prototype-a-84b6cb604310399529a695a421a85af700bbb796.tar.bz2 prototype-a-84b6cb604310399529a695a421a85af700bbb796.zip | |
Diffstat (limited to 'Assets/Scripts/Quit.cs')
| -rw-r--r-- | Assets/Scripts/Quit.cs | 21 |
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*/ + } + } +} |
