You've already forked zumbi-game
add ESC exit handler
This commit is contained in:
@@ -0,0 +1,21 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class ExitHandles : MonoBehaviour
|
||||||
|
{
|
||||||
|
private void FixedUpdate()
|
||||||
|
{
|
||||||
|
if (Input.GetKeyDown(KeyCode.Escape))
|
||||||
|
{
|
||||||
|
QuitGame();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void QuitGame()
|
||||||
|
{
|
||||||
|
Application.Quit();
|
||||||
|
|
||||||
|
#if UNITY_EDITOR
|
||||||
|
UnityEditor.EditorApplication.isPlaying = false;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 5384884ed8e0b864cb4f90b078206b62
|
||||||
Reference in New Issue
Block a user