20 lines
No EOL
352 B
C#
20 lines
No EOL
352 B
C#
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
namespace View {
|
|
public class CloseButton : MonoBehaviour {
|
|
private Button _button;
|
|
|
|
private void Start() {
|
|
_button = GetComponent<Button>();
|
|
_button.onClick.AddListener(CloseClicked);
|
|
}
|
|
|
|
private void CloseClicked() {
|
|
#if UNITY_EDITOR
|
|
Debug.Log("Quit");
|
|
#endif
|
|
Application.Quit();
|
|
}
|
|
}
|
|
} |