2024-11-13 17:58:34 +08:00
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
2024-12-18 20:32:37 +08:00
|
|
|
using System.Threading.Tasks;
|
2024-11-13 17:58:34 +08:00
|
|
|
using UnityEngine;
|
|
|
|
using UnityEngine.UI;
|
|
|
|
using DG.Tweening;
|
2024-12-18 20:32:37 +08:00
|
|
|
using Unity.VisualScripting;
|
|
|
|
|
2024-11-13 17:58:34 +08:00
|
|
|
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;
|
|
|
|
|
2024-12-18 20:32:37 +08:00
|
|
|
|
|
|
|
|
2024-11-13 17:58:34 +08:00
|
|
|
|
2024-12-18 20:32:37 +08:00
|
|
|
public Text Name;
|
|
|
|
public Text Id;
|
|
|
|
|
|
|
|
public AssetsPanel _AssetsPanel;
|
2024-11-13 17:58:34 +08:00
|
|
|
|
|
|
|
void Start()
|
2024-12-18 20:32:37 +08:00
|
|
|
{
|
2024-11-13 17:58:34 +08:00
|
|
|
Avatarbtn.onClick.AddListener(Display_pop_up_window);
|
|
|
|
AvatarPanel.gameObject.SetActive(false);
|
2024-12-18 20:32:37 +08:00
|
|
|
|
|
|
|
UpdateShow();
|
2024-11-13 17:58:34 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
private void Display_pop_up_window()
|
|
|
|
{
|
|
|
|
AvatarPanel.gameObject.SetActive(true);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void CloseClick()
|
|
|
|
{
|
|
|
|
AvatarPanel.gameObject.SetActive(false);
|
|
|
|
}
|
|
|
|
|
2024-12-18 20:32:37 +08:00
|
|
|
async void UpdateShow()
|
|
|
|
{
|
2024-12-18 20:49:42 +08:00
|
|
|
|
2024-11-13 17:58:34 +08:00
|
|
|
|
2024-12-18 20:32:37 +08:00
|
|
|
this.Name.text = _AssetsPanel._PlayerInfoData.nickname.ToString();
|
|
|
|
this.Id.text = _AssetsPanel._PlayerInfoData.uid.ToString();
|
|
|
|
}
|
2024-11-13 17:58:34 +08:00
|
|
|
}
|