Beispiel #1
0
        public async void Show()
        {
            var info = await remote.GetGold(2);

            if (!info.isShow)
            {
                return;
            }
            dia.onCloseBtnClick = async() =>
            {
                await remote.SetGold(info.money);

                //data.money += info.money;
            };
            dia.Open(info.money);
            btn.ShowBtnType(2);
            text.SetValues(info.other.ToString());
            btn.onClick = async() =>
            {
                await remote.SetGold(info.other);

                //data.money += info.other;
                dia.onCloseBtnClick = null;
                dia.Close();
                onReward?.Invoke();
            };
        }
Beispiel #2
0
        private void Update()
        {
            diaTxt.SetValues(dia.ToString());
            float m = forUI.ToFloat(dia);

            money.SetValues(m < 1?m.ToString("f2"):m.ToString("f0"));
            process.process = (float)data.money / dia;
        }
Beispiel #3
0
 public void Open(int money)
 {
     tryInit();
     gameObject.SetActive(true);
     closed.gameObject.SetActive(false);
     down.ReStart();
     describ.SetValues(money.ToString(), forUI.ToString(money));
     rewardTxt.SetValues(money.ToString());
 }
Beispiel #4
0
 void Update()
 {
     text.SetValues(user.money.ToString(), forUI.ToString(user.money));
 }