Update LogUI.cs

This commit is contained in:
ALEXTANG
2023-04-19 15:34:57 +08:00
parent 6cccf0b80f
commit 2f194bbb4a

View File

@@ -1,4 +1,6 @@
using UnityEngine.UI;
using System;
using Cysharp.Threading.Tasks;
using UnityEngine.UI;
using TEngine;
namespace GameLogic
@@ -13,21 +15,23 @@ namespace GameLogic
{
m_textError = FindChildComponent<Text>("m_textError");
m_btnClose = FindChildComponent<Button>("m_btnClose");
m_btnClose.onClick.AddListener(OnClickCloseBtn);
m_btnClose.onClick.AddListener(UniTask.UnityAction(OnClickCloseBtn));
}
#endregion
#region
private void OnClickCloseBtn()
private async UniTaskVoid OnClickCloseBtn()
{
await UniTask.Delay(TimeSpan.FromSeconds(0.5f));
Close();
}
#endregion
public override void OnRefresh()
{
m_textError.text = UserData.ToString();
}
public override void OnRefresh()
{
m_textError.text = UserData.ToString();
}
}
}
}