protected override bool SetupView()
        {
            PlayerScoinExchangeInfo info = Singleton <PlayerModule> .Instance.playerData.scoinExchangeCache.Value;

            if (info != null)
            {
                base.view.transform.Find("Dialog/Content/Times/NumText").GetComponent <Text>().text         = string.Format("({0}/{1})", info.usableTimes, info.totalTimes);
                base.view.transform.Find("Dialog/Content/Exchange/HCoinNumText").GetComponent <Text>().text = info.hcoinCost.ToString();
                base.view.transform.Find("Dialog/Content/Exchange/SCoinNumText").GetComponent <Text>().text = info.scoinGet.ToString();
            }
            return(false);
        }
Esempio n. 2
0
        private bool OnGetScoinExchangeInfoRsp(GetScoinExchangeInfoRsp rsp)
        {
            bool flag = this.playerData.scoinExchangeCache.Value == null;
            PlayerScoinExchangeInfo info = new PlayerScoinExchangeInfo {
                usableTimes = (int)rsp.get_usable_times(),
                totalTimes  = (int)rsp.get_total_times(),
                hcoinCost   = (int)rsp.get_hcoin_cost(),
                scoinGet    = (int)rsp.get_scoin_get()
            };

            this.playerData.scoinExchangeCache.Value = info;
            if (flag)
            {
                Singleton <NotifyManager> .Instance.FireNotify(new Notify(NotifyTypes.ShowScoinExchangeInfo, rsp));
            }
            return(false);
        }