Initial commit
This commit is contained in:
16
Assets/Materials/Nature/Scripts/ExitGame.cs
Normal file
16
Assets/Materials/Nature/Scripts/ExitGame.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace IdyllicFantasyNature
|
||||
{
|
||||
public class ExitGame : MonoBehaviour
|
||||
{
|
||||
void Update()
|
||||
{
|
||||
// If you press the ESC key in the game, the application will be closed
|
||||
if (Input.GetKey(KeyCode.Escape))
|
||||
{
|
||||
Application.Quit();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user