26 lines
428 B
C#
26 lines
428 B
C#
using UnityEngine;
|
|
using UnityEngine.InputSystem;
|
|
|
|
public class ExitCheck : MonoBehaviour
|
|
{
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
|
|
public void OnExit(InputValue value)
|
|
{
|
|
if (value.isPressed)
|
|
{
|
|
Debug.Log("Goodbye!");
|
|
Application.Quit(0);
|
|
}
|
|
}
|
|
}
|