32 lines
614 B
C#
32 lines
614 B
C#
using System;
|
|
using SHADE;
|
|
|
|
public class MainMenu : Script
|
|
{
|
|
protected override void awake()
|
|
{
|
|
Audio.PlayBGMOnce2D("event:/Music/main_menu");
|
|
}
|
|
protected override void update()
|
|
{
|
|
if (Input.GetKeyDown(Input.KeyCode.Space))
|
|
{
|
|
Audio.PlaySFXOnce2D("event:/UI/mouse_down_element");
|
|
}
|
|
|
|
if (Input.GetKeyUp(Input.KeyCode.Space))
|
|
{
|
|
Audio.PlaySFXOnce2D("event:/UI/success");
|
|
SceneManager.ChangeScene(86098106);
|
|
Audio.StopAllSounds();
|
|
}
|
|
|
|
if (Input.GetKeyDown(Input.KeyCode.Escape))
|
|
{
|
|
Audio.StopAllSounds();
|
|
Application.Quit();
|
|
}
|
|
}
|
|
}
|
|
|