Cute_demon_attacks/meng_yao/Assets/script/TanChuang/HeadTanchuang.cs
wulongxiao 6649d55ab5 xiubug
2024-12-18 20:32:37 +08:00

53 lines
1.1 KiB
C#

using System.Collections;
using System.Collections.Generic;
using System.Threading.Tasks;
using UnityEngine;
using UnityEngine.UI;
using DG.Tweening;
using Unity.VisualScripting;
public class HeadTanchuang : MonoBehaviour
{
public GameObject AvatarPanel;
public Button Avatarbtn;
public RectTransform AvatarRect;
Vector3 Deflate = new Vector3(0.5f, 0.5f, 0.5f);
public Transform canvas;
public Text Name;
public Text Id;
public AssetsPanel _AssetsPanel;
void Start()
{
Avatarbtn.onClick.AddListener(Display_pop_up_window);
AvatarPanel.gameObject.SetActive(false);
UpdateShow();
}
private void Display_pop_up_window()
{
AvatarPanel.gameObject.SetActive(true);
}
public void CloseClick()
{
AvatarPanel.gameObject.SetActive(false);
}
async void UpdateShow()
{
await Task.Delay(100);
this.Name.text = _AssetsPanel._PlayerInfoData.nickname.ToString();
this.Id.text = _AssetsPanel._PlayerInfoData.uid.ToString();
}
}