整合包

gameplay bundle has been imported together
This commit is contained in:
FloatGaming
2025-08-09 18:29:32 +08:00
parent e7962bf492
commit 1d818fa4eb
1654 changed files with 431813 additions and 103 deletions
+30
View File
@@ -0,0 +1,30 @@
using DG.Tweening;
using UnityEngine;
public class UI_Show_Anim : MonoBehaviour
{
public float animTime_Alpha = 1f;
public float animTime_Scale = 1f;
private void OnEnable()
{
Clear();
transform.localScale = new();
transform.DOScale(1, animTime_Scale);
gameObject.Try_Get_Component(out CanvasGroup canvasGroup);
float a = 0;
DOTween.To(() => a, (f) => { a = f; canvasGroup.alpha = f; }, 1, animTime_Alpha);
}
public void Close()
{
Clear();
transform.DOScale(0, animTime_Scale);
gameObject.Try_Get_Component(out CanvasGroup canvasGroup);
float a = 1;
DOTween.To(() => a, (f) => { a = f; canvasGroup.alpha = f; }, 0, animTime_Alpha);
}
void Clear()
{
DOTween.KillAll(transform);
}
}