using AFeijia.UI; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.UI; using static InterfaceManager; /// /// Óû§ÐÅÏ¢ /// public class UserInfo : UITool, IPointerEnterHandler, IPointerExitHandler { public Button logout_button; public Image user_avatar; public void OnPointerEnter(PointerEventData eventData) { logout_button.gameObject.SetActive(true); } public void OnPointerExit(PointerEventData eventData) { logout_button.gameObject.SetActive(false); } protected override void Awake() { base.Awake(); } // Start is called before the first frame update void Start() { Init(); } void Init() { if(!string.IsNullOrEmpty(CallForTest.instance.user.avatar)) { StartCoroutine(InterfaceManager.GetSprite(CallForTest.instance.user.avatar, (_sprite) => { user_avatar.sprite = _sprite; })); } } private void OnEnable() { logout_button.gameObject.SetActive(false); } }