26 lines
581 B
C#
26 lines
581 B
C#
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
namespace Watermelon
|
|
{
|
|
[RequireComponent(typeof(Button))]
|
|
public class SettingsPanelButton : MonoBehaviour
|
|
{
|
|
public Button Button { get; private set; }
|
|
|
|
private void Awake()
|
|
{
|
|
Button = GetComponent<Button>();
|
|
Button.onClick.AddListener(OnClick);
|
|
}
|
|
|
|
private void OnClick()
|
|
{
|
|
UIController.ShowPage<UISettings>();
|
|
|
|
// Play button sound
|
|
AudioController.PlaySound(AudioController.GetClip("button_sound"));
|
|
}
|
|
}
|
|
}
|