DESKTOP-SAJ6RKV\Administrator bca87e61fc 点赞
2025-06-04 06:20:22 +08:00

42 lines
934 B
C#

using UnityEngine;
using UnityEngine.UI;
using TEngine;
using TMPro;
using System.Threading.Tasks;
using Cysharp.Threading.Tasks;
namespace GameLogic
{
[Window(UILayer.UI)]
class UIDianZanItem : UIWidget
{
#region
private TextMeshProUGUI m_tmp_PlayerName;
protected override void ScriptGenerator()
{
m_tmp_PlayerName = FindChildComponent<TextMeshProUGUI>("Icon/m_tmp_PlayerName");
}
#endregion
#region
#endregion
public void OnInit(string nickname)
{
if (!string.IsNullOrEmpty(nickname))
{
m_tmp_PlayerName.text = nickname;
UniTask.Delay(3000).ContinueWith(() => { Destroy(); });
}
else
{
Debug.LogError("m_tmp_PlayerName is null");
Destroy();
}
}
}
}