fix(save): 读档前恢复 timeScale 并用 unscaledTime 淡入

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-06 20:21:52 +08:00
co-authored by Cursor
parent b612a0763d
commit d9c8e85f2b
3 changed files with 24 additions and 11 deletions
+12 -2
View File
@@ -7,10 +7,15 @@ namespace AibisDream.Framework
{
public static class FadeKit
{
public static IEnumerator FadeInAsync(this Image image, float duration)
public static IEnumerator FadeInAsync(this Image image, float duration, bool useUnscaledTime = false)
{
image.gameObject.SetActive(true);
var tweener = image.DOBlendableColor(Color.white, duration);
if (useUnscaledTime)
{
tweener.SetUpdate(true);
}
yield return tweener.WaitForCompletion();
}
@@ -20,10 +25,15 @@ namespace AibisDream.Framework
var tweener = image.DOBlendableColor(Color.white, duration);
}
public static IEnumerator FadeOutAsync(this Image image, float duration)
public static IEnumerator FadeOutAsync(this Image image, float duration, bool useUnscaledTime = false)
{
image.gameObject.SetActive(true);
var tweener = image.DOBlendableColor(Color.clear, duration);
if (useUnscaledTime)
{
tweener.SetUpdate(true);
}
yield return tweener.WaitForCompletion();
image.gameObject.SetActive(false);
}