예제 #1
0
        private GachaModule()
        {
            Singleton <NotifyManager> .Instance.RegisterModule(this);

            this._gachaDisplayInfo       = null;
            this._lastCheckGachaInfoTime = DateTime.MinValue;
        }
예제 #2
0
 private bool OnGetGachaDisplayRsp(GetGachaDisplayRsp rsp)
 {
     if (rsp.get_retcode() == null)
     {
         if (this._gachaDisplayInfo == null)
         {
             this._gachaDisplayInfo = new GachaDisplayInfo();
         }
         this._gachaDisplayInfo.hcoinGachaData       = rsp.get_hcoin_gacha_data();
         this._gachaDisplayInfo.specialGachaData     = (rsp.get_special_hcoin_gacha_data_list().Count <= 0) ? null : rsp.get_special_hcoin_gacha_data_list()[0];
         this._gachaDisplayInfo.friendPointGachaData = rsp.get_friends_point_gacha_data();
         this._lastCheckGachaInfoTime = TimeUtil.Now;
     }
     return(false);
 }
예제 #3
0
        protected override bool SetupView()
        {
            this._displayInfo = Singleton <GachaModule> .Instance.GachaDisplay;
            if (this._displayInfo == null)
            {
                base.view.transform.Find("BlockPanel").gameObject.SetActive(true);
                base.view.transform.Find("HCoinTab").gameObject.SetActive(false);
                base.view.transform.Find("SpecialTab").gameObject.SetActive(false);
                base.view.transform.Find("FriendPointTab").gameObject.SetActive(false);
                base.view.transform.Find("TabBtns").gameObject.SetActive(false);
                Singleton <NetworkManager> .Instance.RequestGachaDisplayInfo();

                return(false);
            }
            base.view.transform.Find("BlockPanel").gameObject.SetActive(false);
            this.UpdateView();
            return(false);
        }
예제 #4
0
        public GachaResultPageContext(GachaDisplayInfo displayInfo, GachaType type, List <StorageDataItemBase> itemList, List <GachaItem> gachaItemList, int cost)
        {
            ContextPattern pattern = new ContextPattern {
                contextName    = "GachaResultPageContext",
                viewPrefabPath = "UI/Menus/Page/Gacha/GachaResultPage",
                cacheType      = ViewCacheType.AlwaysCached
            };

            base.config        = pattern;
            this._type         = type;
            this._itemList     = itemList;
            this._rareItemList = new HashSet <int>();
            foreach (GachaItem item in gachaItemList)
            {
                if (item.get_is_rare_dropSpecified() && item.get_is_rare_drop())
                {
                    this._rareItemList.Add((int)item.get_item_id());
                }
            }
            this._cost        = cost;
            this._displayInfo = displayInfo;
        }