You've already forked zumbi-game
22 lines
349 B
C#
22 lines
349 B
C#
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
|
|
}
|
|
}
|