改动与优化

This commit is contained in:
FloatGaming
2026-07-20 22:19:25 +08:00
parent 0a0872c4f4
commit b5d1cdcbc5
83 changed files with 2475 additions and 276 deletions
+27 -1
View File
@@ -16,8 +16,15 @@ public class roomAsk : MonoBehaviour
private Func<Task> _onCreate;
private Func<string, Task> _onJoin;
private void Awake()
{
EnsurePopupTween();
}
public void Bind(Func<Task> onCreate, Func<string, Task> onJoin)
{
EnsurePopupTween();
_onCreate = onCreate;
_onJoin = onJoin;
@@ -132,6 +139,25 @@ public class roomAsk : MonoBehaviour
private void HandleQuitChoiceClicked()
{
Destroy(gameObject);
CloseSelfWithExitAnim();
}
private void CloseSelfWithExitAnim()
{
UI_PanelExitUtility.PlayExitThen(gameObject, () =>
{
if (gameObject != null)
{
Destroy(gameObject);
}
});
}
private void EnsurePopupTween()
{
if (GetComponent<UI_PanelPopupTween>() == null)
{
gameObject.AddComponent<UI_PanelPopupTween>();
}
}
}