mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-07 16:45:10 +00:00
38 lines
930 B
C#
38 lines
930 B
C#
using System;
|
|
using Cysharp.Threading.Tasks;
|
|
using UnityEngine.UI;
|
|
using TEngine;
|
|
|
|
namespace GameLogic
|
|
{
|
|
[Window(UILayer.System)]
|
|
class LogUI : UIWindow
|
|
{
|
|
#region 脚本工具生成的代码
|
|
private Text m_textError;
|
|
private Button m_btnClose;
|
|
public override void ScriptGenerator()
|
|
{
|
|
m_textError = FindChildComponent<Text>("m_textError");
|
|
m_btnClose = FindChildComponent<Button>("m_btnClose");
|
|
m_btnClose.onClick.AddListener(UniTask.UnityAction(OnClickCloseBtn));
|
|
}
|
|
#endregion
|
|
|
|
#region 事件
|
|
private async UniTaskVoid OnClickCloseBtn()
|
|
{
|
|
await UniTask.Delay(TimeSpan.FromSeconds(0.5f));
|
|
|
|
Close();
|
|
}
|
|
#endregion
|
|
|
|
public override void OnRefresh()
|
|
{
|
|
m_textError.text = UserData.ToString();
|
|
}
|
|
|
|
}
|
|
}
|