修复了选曲的问题 优化了ui

This commit is contained in:
FloatGaming
2026-01-08 21:04:36 +08:00
parent e7f4ac72d5
commit 2738089af1
414 changed files with 60357 additions and 5279 deletions
@@ -0,0 +1,77 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace AiryUI
{
public class EscButtonController : MonoBehaviour
{
public List<EscCloseButton> esc_buttons = new List<EscCloseButton> ();
public static EscButtonController Instance;
private void Awake ()
{
if ( Instance == null )
Instance = this;
else
Destroy ( gameObject );
}
private void Update ()
{
if ( Input.GetKeyDown ( KeyCode.Escape ) )
{
DoBack ();
}
}
private void DoBack ()
{
if ( esc_buttons.Count > 0 )
{
var last_button = esc_buttons [ esc_buttons.Count - 1 ];
if ( last_button != null )
{
last_button.DoBack ();
}
else
{
Debug.LogError ( "<color=orange><b>[Airy UI]</color></b> <color=red><b>X</color></b> there's a missing item in <b>'ESC Button Controller'</b>, please check your list again!" , gameObject );
}
}
}
public void AddButtonToList ( EscCloseButton backButton )
{
if ( !esc_buttons.Contains ( backButton ) )
{
esc_buttons.Add ( backButton );
}
}
public void RemoveButtonFromList ( EscCloseButton backButton )
{
if ( esc_buttons.Contains ( backButton ) )
{
esc_buttons.Remove ( backButton );
}
}
}
}