Exemplo n.º 1
0
        protected override bool SetupView()
        {
            PlayerStaminaExchangeInfo info = Singleton <PlayerModule> .Instance.playerData.staminaExchangeCache.Value;

            this._nextRecoverTimeText = base.view.transform.Find("Dialog/Content/StaminaInfo/RecoverTimeText").GetComponent <Text>();
            this.SetupStaminaInfo();
            object[] replaceParams = new object[] { info.usableTimes };
            base.view.transform.Find("Dialog/Content/DescText").GetComponent <Text>().text = LocalizationGeneralLogic.GetText(this._descText, replaceParams);
            base.view.transform.Find("Dialog/Content/Exchange/HCoinNumText").GetComponent <Text>().text   = info.hcoinCost.ToString();
            base.view.transform.Find("Dialog/Content/Exchange/StaminaNumText").GetComponent <Text>().text = info.staminaGet.ToString();
            return(false);
        }
Exemplo n.º 2
0
        private bool OnGetStaminaExchangeInfoRsp(GetStaminaExchangeInfoRsp rsp)
        {
            PlayerStaminaExchangeInfo info = new PlayerStaminaExchangeInfo {
                usableTimes = (int)rsp.get_usable_times(),
                totalTimes  = (int)rsp.get_total_times(),
                hcoinCost   = (int)rsp.get_hcoin_cost(),
                staminaGet  = (int)rsp.get_stamina_get()
            };

            this.playerData.staminaExchangeCache.Value = info;
            this.playerData._cacheDataUtil.OnGetRsp(0x11);
            return(false);
        }