SHADE_Y3/Assets/Scripts/SC_MainMenu.cs

27 lines
508 B
C#
Raw Normal View History

2022-11-22 16:18:16 +08:00
using System;
using SHADE;
public class MainMenu : Script
2022-11-22 16:18:16 +08:00
{
protected override void awake()
{
Audio.PlayBGMOnce2D("event:/Music/main_menu");
2022-11-22 16:18:16 +08:00
}
protected override void update()
{
if (Input.GetKeyDown(Input.KeyCode.Space))
{
2022-11-23 00:44:27 +08:00
Audio.PlaySFXOnce2D("event:/UI/mouse_down_element");
2022-11-25 12:09:03 +08:00
SceneManager.ChangeScene(89830755);
Audio.StopAllSounds();
}
2022-11-23 00:44:27 +08:00
if (Input.GetKeyDown(Input.KeyCode.Escape))
2022-11-23 00:44:27 +08:00
{
Audio.StopAllSounds();
2022-11-23 00:44:27 +08:00
Application.Quit();
}
2022-11-22 16:18:16 +08:00
}
}