SHADE_Y3/Assets/Scripts/UI/SC_QuitButton.cs

22 lines
347 B
C#
Raw Normal View History

2023-02-03 22:59:49 +08:00
using System;
using SHADE;
public class QuitButton : Script
{
protected override void start()
2023-02-03 22:59:49 +08:00
{
UIElement ui = GetComponent<UIElement>();
ui.OnClick.RegisterAction(() =>
{
Audio.StopAllSounds();
Application.Quit();
});
}
protected override void update()
{
}
}