42 lines
954 B
C#
42 lines
954 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 = UITool.ConvertName(nickname);
|
|
UniTask.Delay(1500).ContinueWith(() => { Destroy(); });
|
|
|
|
}
|
|
else
|
|
{
|
|
Debug.LogError("m_tmp_PlayerName is null");
|
|
Destroy();
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
}
|