超大量的更新 修复很多问题,gameplay特效初步

This commit is contained in:
2026-02-14 23:46:20 +08:00
parent ef8eb67259
commit 3a7a0b4669
360 changed files with 85670 additions and 4144 deletions
+14 -3
View File
@@ -15,7 +15,9 @@ public class UI_Show_Anim : MonoBehaviour
{
canvasGroup.alpha = 0;
float a = 0;
DOTween.To(() => a, (f) => { a = f; canvasGroup.alpha = f; }, 1, animTime_Alpha).SetUpdate(true);
DOTween.To(() => a, (f) => { a = f; canvasGroup.alpha = f; }, 1, animTime_Alpha)
.SetUpdate(true)
.SetTarget(canvasGroup);
}
}
public void Close()
@@ -25,11 +27,20 @@ public class UI_Show_Anim : MonoBehaviour
if (gameObject.Try_Get_Component(out CanvasGroup canvasGroup))
{
float a = 1;
DOTween.To(() => a, (f) => { a = f; canvasGroup.alpha = f; }, 0, animTime_Alpha).SetUpdate(true);
DOTween.To(() => a, (f) => { a = f; canvasGroup.alpha = f; }, 0, animTime_Alpha)
.SetUpdate(true)
.SetTarget(canvasGroup);
}
}
void Clear()
{
DOTween.KillAll(transform);
// Only kill tweens that belong to this UI element.
// Passing a Transform into DOTween.KillAll(...) is dangerous in Unity because Transform has an implicit bool
// conversion, which ends up calling KillAll(true) and wipes tweens globally.
transform.DOKill();
if (gameObject.Try_Get_Component(out CanvasGroup canvasGroup))
{
canvasGroup.DOKill();
}
}
}