using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
namespace TowerDefense.UI
{
///
/// A button for exiting the game
///
public class ExitButton : Button
{
///
/// Close the game when this button is clicked
///
public override void OnPointerClick(PointerEventData eventData)
{
Application.Quit();
}
///
/// Disable this button on mobile platforms
///
protected override void Awake()
{
base.Awake();
#if UNITY_ANDROID || UNITY_IOS
if (Application.isPlaying)
{
gameObject.SetActive(false);
}
#endif
}
}
}