2022-11-22 16:18:16 +08:00
|
|
|
|
using System;
|
|
|
|
|
using SHADE;
|
2023-02-04 00:23:05 +08:00
|
|
|
|
using SHADE_Scripting.Audio;
|
2023-03-02 15:47:00 +08:00
|
|
|
|
using SHADE_Scripting.UI;
|
2022-11-22 16:18:16 +08:00
|
|
|
|
|
2022-11-22 17:28:48 +08:00
|
|
|
|
public class MainMenu : Script
|
2022-11-22 16:18:16 +08:00
|
|
|
|
{
|
2023-02-03 00:03:05 +08:00
|
|
|
|
public uint sceneID;
|
2023-02-21 19:31:50 +08:00
|
|
|
|
|
|
|
|
|
public GameObject obj;
|
|
|
|
|
private Renderable renderable;
|
|
|
|
|
|
2022-11-22 16:18:16 +08:00
|
|
|
|
protected override void awake()
|
|
|
|
|
{
|
2023-02-04 00:23:05 +08:00
|
|
|
|
AudioHandler.audioClipHandlers["BGMMainMenu"] = Audio.CreateAudioClip("event:/Music/main_menu");
|
2023-03-11 13:07:25 +08:00
|
|
|
|
//AudioHandler.audioClipHandlers["SFXMouseDownElement"] = Audio.CreateAudioClip("event:/UI/mouse_down_element");
|
|
|
|
|
//AudioHandler.audioClipHandlers["SFXUISuccess"] = Audio.CreateAudioClip("event:/UI/success");
|
2023-02-04 00:23:05 +08:00
|
|
|
|
//Audio.PlayBGMOnce2D("event:/Music/main_menu");
|
|
|
|
|
AudioHandler.audioClipHandlers["BGMMainMenu"].Play();
|
2023-02-21 19:31:50 +08:00
|
|
|
|
|
|
|
|
|
renderable = obj.GetComponent<Renderable>();
|
2023-02-27 15:33:58 +08:00
|
|
|
|
|
2023-02-21 19:31:50 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void start()
|
|
|
|
|
{
|
2023-03-05 21:11:24 +08:00
|
|
|
|
Input.SetMouseCentering(false);
|
|
|
|
|
Application.IsCursorVisible = true;
|
2023-04-01 16:08:32 +08:00
|
|
|
|
if(SceneFadeInOut.Instance)
|
|
|
|
|
SceneFadeInOut.Instance.CallFadeOut();
|
2022-11-22 16:18:16 +08:00
|
|
|
|
}
|
|
|
|
|
protected override void update()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|