mirror of
https://github.com/FriendshipIsEpic/FiE-Game.git
synced 2024-11-25 15:08:00 +01:00
15 lines
315 B
C#
15 lines
315 B
C#
|
using UnityEngine;
|
|||
|
using System.Collections;
|
|||
|
|
|||
|
public class QuitOnEscapeOrBack : MonoBehaviour
|
|||
|
{
|
|||
|
private void Update()
|
|||
|
{
|
|||
|
// "back" button of phone equals "Escape". quit app if that's pressed
|
|||
|
if (Input.GetKeyDown(KeyCode.Escape))
|
|||
|
{
|
|||
|
Application.Quit();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|