123456789101112131415161718192021222324252627282930313233343536373839404142 |
- using System;
- using Api;
- using Plugins.CxShine.Singleton;
- using UnityEngine.UI;
- namespace UI.Hall
- {
- public class UserInfoComp : UnitySingleton<UserInfoComp>
- {
- public Text Diamond;
- public Text NickName;
- public Text UserId;
- public Image Avatar;
- private void Start()
- {
- RefreshSelfUI();
- }
- public void RefreshSelfUI()
- {
- AccountManager.Instance.requestSelfInfo(data =>
- {
- NickName.text = AccountManager.Instance.selfInfo.name + "";
- UserId.text = "ID:" + AccountManager.Instance.selfInfo.playerId + "";
- if (Diamond != null)
- {
- Diamond.text = "" + AccountManager.Instance.selfInfo.diamond + "";
- }
- AvatarUtil.DisplayAvatar(Avatar, AccountManager.Instance.selfInfo.avatar);
- },((i, s) =>
- {
-
-
- }));
-
-
- }
- }
- }
|