21 lines
349 B
C#
21 lines
349 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class Quit : MonoBehaviour
|
|
{
|
|
void Update()
|
|
{
|
|
if (Input.GetKeyDown(KeyCode.Escape) /*|| Input.GetKeyDown(KeyCode.Home)*/)
|
|
{
|
|
OnExitGame();
|
|
}
|
|
}
|
|
public void OnExitGame()
|
|
{
|
|
Application.Quit();
|
|
|
|
}
|
|
|
|
}
|