改动与优化

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
+15 -3
View File
@@ -59,7 +59,7 @@ class UI_Panel_Character : MonoBehaviour
{
if (Input.GetKeyDown(KeyCode.Escape))
{
gameObject.SetActive(false);
ClosePanel();
}
}
@@ -77,7 +77,7 @@ class UI_Panel_Character : MonoBehaviour
confirm_thisHero.onClick.AddListener(OnConfirmHeroClicked);
if (quitButton != null)
quitButton.onClick.AddListener(() => gameObject.SetActive(false));
quitButton.onClick.AddListener(ClosePanel);
if (Image_Character_Illustration != null)
{
@@ -126,6 +126,7 @@ class UI_Panel_Character : MonoBehaviour
for (int i = 0; i < allyHeroList.Count; i++)
{
var slotObject = Instantiate(button_Character_Slot_Prefab, content_Character_Slot);
UI_OrderedEntryAnimator.PlayFadeOnly(slotObject, i, 0.16f, 0.012f, true);
var displayPrefab = slotObject.GetComponent<uiui_character_displayPrefab>();
var slotButton = displayPrefab != null ? displayPrefab.characterProfileButton : slotObject.GetComponent<Button>();
if (slotButton == null && slotObject.transform.parent != null)
@@ -178,7 +179,7 @@ class UI_Panel_Character : MonoBehaviour
{
if (SaveCurrentCharacter(true))
{
gameObject.SetActive(false);
ClosePanel();
}
}
@@ -315,4 +316,15 @@ class UI_Panel_Character : MonoBehaviour
.SetLink(text_char_name.gameObject);
}
}
private void ClosePanel()
{
UI_PanelExitUtility.PlayExitThen(gameObject, () =>
{
if (gameObject != null)
{
gameObject.SetActive(false);
}
});
}
}