Slight UI movements
This commit is contained in:
16
Assets/MainMenuUI/QuitGame.cs
Normal file
16
Assets/MainMenuUI/QuitGame.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class GameQuitter : MonoBehaviour
|
||||
{
|
||||
// Method to quit the game
|
||||
public void QuitGame()
|
||||
{
|
||||
// Closes the application
|
||||
Application.Quit();
|
||||
|
||||
// For the editor (testing purposes), stops play mode
|
||||
#if UNITY_EDITOR
|
||||
UnityEditor.EditorApplication.isPlaying = false;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user