chunk 1: core gameplay scripts scenes runtime assets
This commit is contained in:
20
Assets/Scripts/Behaviours/UI/UIPanelQuitBehaviour.cs
Normal file
20
Assets/Scripts/Behaviours/UI/UIPanelQuitBehaviour.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class UIPanelQuitBehaviour : MonoBehaviour
|
||||
{
|
||||
public void ButtonPressedQuitGame()
|
||||
{
|
||||
QuitGame();
|
||||
}
|
||||
|
||||
void QuitGame()
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
UnityEditor.EditorApplication.isPlaying = false;
|
||||
#else
|
||||
Application.Quit();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user