2022-11-22 16:18:16 +08:00
|
|
|
|
using System;
|
|
|
|
|
using SHADE;
|
|
|
|
|
|
2022-11-22 17:28:48 +08:00
|
|
|
|
public class MainMenu : Script
|
2022-11-22 16:18:16 +08:00
|
|
|
|
{
|
|
|
|
|
protected override void awake()
|
|
|
|
|
{
|
2022-11-23 17:37:06 +08:00
|
|
|
|
Audio.PlayBGMOnce2D("event:/Music/main_menu");
|
2022-11-22 16:18:16 +08:00
|
|
|
|
}
|
|
|
|
|
protected override void update()
|
|
|
|
|
{
|
2022-11-25 00:54:45 +08:00
|
|
|
|
if (Input.GetKeyDown(Input.KeyCode.Space))
|
2022-11-22 17:28:48 +08:00
|
|
|
|
{
|
2022-11-23 00:44:27 +08:00
|
|
|
|
Audio.PlaySFXOnce2D("event:/UI/mouse_down_element");
|
2022-11-26 08:28:37 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (Input.GetKeyUp(Input.KeyCode.Space))
|
|
|
|
|
{
|
|
|
|
|
Audio.PlaySFXOnce2D("event:/UI/success");
|
2022-11-25 14:45:19 +08:00
|
|
|
|
SceneManager.ChangeScene(86098106);
|
2022-11-23 17:37:06 +08:00
|
|
|
|
Audio.StopAllSounds();
|
2022-11-22 17:28:48 +08:00
|
|
|
|
}
|
2022-11-23 00:44:27 +08:00
|
|
|
|
|
2022-11-25 00:54:45 +08:00
|
|
|
|
if (Input.GetKeyDown(Input.KeyCode.Escape))
|
2022-11-23 00:44:27 +08:00
|
|
|
|
{
|
2022-11-23 17:37:06 +08:00
|
|
|
|
Audio.StopAllSounds();
|
2022-11-23 00:44:27 +08:00
|
|
|
|
Application.Quit();
|
|
|
|
|
}
|
2022-11-22 16:18:16 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|