34 lines
815 B
C#
34 lines
815 B
C#
|
using System.Threading;
|
|||
|
using Cysharp.Threading.Tasks;
|
|||
|
using UnityEngine.UI;
|
|||
|
|
|||
|
namespace Game;
|
|||
|
|
|||
|
[UIType(UIType.GameSceneResultUI)]
|
|||
|
public class GameSceneResultUI : UIBase
|
|||
|
{
|
|||
|
private Image img_Lose;
|
|||
|
private Image img_Success;
|
|||
|
|
|||
|
public override void Init()
|
|||
|
{
|
|||
|
base.Init();
|
|||
|
this.img_Lose = this.self.transform.FindChildDeep<Image>("img_Lose");
|
|||
|
this.img_Success = this.self.transform.FindChildDeep<Image>("img_Success");
|
|||
|
}
|
|||
|
|
|||
|
public override void Dispose()
|
|||
|
{
|
|||
|
base.Dispose();
|
|||
|
}
|
|||
|
|
|||
|
public async UniTask WaitShowAndCloseResultAsync(bool isTrue, CancellationToken token)
|
|||
|
{
|
|||
|
img_Success.gameObject.SetActive(isTrue);
|
|||
|
this.img_Lose.gameObject.SetActive(!isTrue);
|
|||
|
|
|||
|
await UniTask.Delay(4000);
|
|||
|
|
|||
|
Game.uiManager.CloseLast();
|
|||
|
}
|
|||
|
}
|