增加LoadingPanel的动画
This commit is contained in:
@@ -2,6 +2,7 @@ using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using A2W;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using DG.Tweening;
|
||||
|
||||
public class LaunchPanel : UIPanel
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user