改动与优化

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
+39 -2
View File
@@ -57,6 +57,7 @@ public class pressStart : MonoBehaviour
// polling
private Coroutine pollCoroutine;
private float pollInterval = 3f;
private UI_PanelPopupTween helpPopupTween;
// Start is called before the first frame update
void Start()
@@ -90,6 +91,11 @@ public class pressStart : MonoBehaviour
}
if (helpContentObject != null)
{
helpPopupTween = helpContentObject.GetComponent<UI_PanelPopupTween>();
if (helpPopupTween == null)
{
helpPopupTween = helpContentObject.AddComponent<UI_PanelPopupTween>();
}
helpContentObject.SetActive(false);
}
@@ -198,7 +204,22 @@ public class pressStart : MonoBehaviour
if (helpContentObject != null)
{
bool isActive = helpContentObject.activeSelf;
helpContentObject.SetActive(!isActive);
if (isActive)
{
HideHelpContentWithExitAnim();
}
else
{
if (helpPopupTween == null)
{
helpPopupTween = helpContentObject.GetComponent<UI_PanelPopupTween>();
if (helpPopupTween == null)
{
helpPopupTween = helpContentObject.AddComponent<UI_PanelPopupTween>();
}
}
helpContentObject.SetActive(true);
}
Debug.Log("[pressStart] Help button clicked. Help content active: " + !isActive);
}
}
@@ -207,11 +228,27 @@ public class pressStart : MonoBehaviour
{
if (helpContentObject != null)
{
helpContentObject.SetActive(false);
HideHelpContentWithExitAnim();
Debug.Log("[pressStart] Close button clicked. Help content hidden.");
}
}
private void HideHelpContentWithExitAnim()
{
if (helpContentObject == null || !helpContentObject.activeInHierarchy)
{
return;
}
UI_PanelExitUtility.PlayExitThen(helpContentObject, () =>
{
if (helpContentObject != null)
{
helpContentObject.SetActive(false);
}
});
}
private void OnExitButtonClick()
{
Debug.Log("[pressStart] Exit button clicked. Application quitting.");