This commit is contained in:
xinkl
2025-11-09 14:06:12 +08:00
4 changed files with 24 additions and 14 deletions

View File

@@ -3,6 +3,7 @@ using UnityEngine.UI;
using A2W;
using Cysharp.Threading.Tasks;
using UnityEngine.InputSystem;
using DG.Tweening;
public class LaunchPanel : UIPanel
{

View File

@@ -3,6 +3,7 @@ using System.Collections.Generic;
using UnityEngine;
using Cysharp.Threading.Tasks;
using A2W;
using DG.Tweening;
public class LoadingPanel : UIPanel, ITransition
{
@@ -21,14 +22,13 @@ public class LoadingPanel : UIPanel, ITransition
{
isDirty = true;
//Tween tween = canvasGroup.DOFade(1, 0.2f);
Tween tween = canvasGroup.DOFade(1, 0.2f);
while (tween != null && tween.active && !tween.IsComplete())
{
await UniTask.Yield();
}
//while (tween != null && tween.active && !tween.IsComplete())
//{
// await UniTask.Yield();
//}
canvasGroup.alpha = 1;
//canvasGroup.alpha = 1;
isDirty = false;
@@ -39,14 +39,13 @@ public class LoadingPanel : UIPanel, ITransition
{
isDirty = true;
//Tween tween = canvasGroup.DOFade(0, 0.2f);
Tween tween = canvasGroup.DOFade(0, 0.2f);
while (tween != null && tween.active && !tween.IsComplete())
{
await UniTask.Yield();
}
//while (tween != null && tween.active && !tween.IsComplete())
//{
// await UniTask.Yield();
//}
canvasGroup.alpha = 0;
//canvasGroup.alpha = 0;
isDirty = false;