From 23fc20c4ad1c768e6be7fea75cbb80f2bda6e21d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Nu=C8=9Biu?= Date: Sun, 30 Jun 2019 17:35:39 +0300 Subject: [PATCH] Listen for escape key and quit the application --- Assets/Scripts/src/Managers/GameManager.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Assets/Scripts/src/Managers/GameManager.cs b/Assets/Scripts/src/Managers/GameManager.cs index 5f4ba61..22b96b9 100644 --- a/Assets/Scripts/src/Managers/GameManager.cs +++ b/Assets/Scripts/src/Managers/GameManager.cs @@ -44,5 +44,12 @@ namespace src.Managers { _levelManager.InitLevel(); } + + /* Listen for meta keys */ + private void Update(){ + if (Input.GetKeyDown(KeyCode.Escape)) + Application.Quit(); + } + } } \ No newline at end of file