using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; namespace MMO { public class MMOUITop : MMOUIBase { public Action DelOpenMoreGames; [SerializeField] Button mBtnMoreGames; [SerializeField] RectTransform mRectDiamond; [SerializeField] Text mTxtDiomand; protected override void OnInit() { base.OnInit(); BindBtn(mBtnMoreGames, OnClickMoreGames); } public void RefreshDiomand() { mTxtDiomand.text = MMOUserData.Instance.Diamond.ToString(); mRectDiamond.sizeDelta = new Vector2(mTxtDiomand.preferredWidth + 80 , mRectDiamond.sizeDelta.y); } private void OnClickMoreGames() { DelOpenMoreGames?.Invoke(); } } }