改动与优化

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
+31 -1
View File
@@ -4,6 +4,7 @@ using UnityEngine.EventSystems;
using System.Collections.Generic;
using System.Collections;
using System.IO;
using DG.Tweening;
public class dlcButton : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
{
@@ -74,7 +75,7 @@ public class dlcButton : MonoBehaviour, IPointerEnterHandler, IPointerExitHandle
public void OnPointerExit(PointerEventData eventData)
{
if (hoverCoroutine != null) StopCoroutine(hoverCoroutine);
if (dlcDetailParent != null) dlcDetailParent.SetActive(false);
HideDlcDetail();
}
public void SetDlcData(dlcData so)
@@ -105,6 +106,7 @@ public class dlcButton : MonoBehaviour, IPointerEnterHandler, IPointerExitHandle
if (dlcDetailParent != null)
{
dlcDetailParent.SetActive(true);
UI_OrderedEntryAnimator.PlayFadeOnly(dlcDetailParent, 0, 0.12f, 0f, true);
// 鏇存柊绠€浠嬩俊鎭?
if (dlcDescription != null)
{
@@ -122,6 +124,34 @@ public class dlcButton : MonoBehaviour, IPointerEnterHandler, IPointerExitHandle
}
}
private void HideDlcDetail()
{
if (dlcDetailParent == null)
{
return;
}
CanvasGroup group = dlcDetailParent.GetComponent<CanvasGroup>();
if (group == null)
{
group = dlcDetailParent.AddComponent<CanvasGroup>();
}
group.DOKill();
group.DOFade(0f, 0.1f)
.SetEase(Ease.OutQuad)
.SetUpdate(true)
.SetTarget(dlcDetailParent)
.OnComplete(() =>
{
if (dlcDetailParent != null)
{
dlcDetailParent.SetActive(false);
group.alpha = 1f;
}
});
}
void Awake()
{
_btn = GetComponent<Button>();