Files
zumbi-game/Assets/Scripts/ExitHandles.cs
T
2026-05-10 22:07:21 +02:00

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
}
}