cun
This commit is contained in:
@@ -13,7 +13,24 @@ public class SelectGameLeave_DefaultUIItem : MonoBehaviour
|
||||
public Button btn_StartQuickly;
|
||||
public Button btn_FanHui;
|
||||
public Button btn_SheZhi;
|
||||
public void UpdateData(string name ,string gold,string diamod)
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
GameManager.Instance.OnAvatarChanged += OnAvatarChanged;
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
if (GameManager.Instance != null)
|
||||
GameManager.Instance.OnAvatarChanged -= OnAvatarChanged;
|
||||
}
|
||||
|
||||
private void OnAvatarChanged(Sprite sprite)
|
||||
{
|
||||
if (sprite != null) sprite_Avatar.sprite = sprite;
|
||||
}
|
||||
|
||||
public void UpdateData(string name, string gold, string diamod)
|
||||
{
|
||||
tMP_Name.text = name;
|
||||
tMP_GoldCount.text = gold;
|
||||
|
||||
Reference in New Issue
Block a user