private bool OnGachaRsp(GachaRsp rsp) { if (rsp.get_retcode() == null) { this._gachaGotList.Clear(); this._gachaItemList = rsp.get_item_list(); this._dropItemShowDialogManager = new SequenceDialogManager(new Action(this.ShowGachaResultPage)); this._unLockAvatarDialogManager = new SequenceDialogManager(new Action(this.ClearUnlockAvatarDialogManagerContent)); foreach (GachaItem item in rsp.get_item_list()) { StorageDataItemBase dummyStorageDataItem = Singleton <StorageModule> .Instance.GetDummyStorageDataItem((int)item.get_item_id(), (int)item.get_level()); if (dummyStorageDataItem != null) { dummyStorageDataItem.number = (int)item.get_num(); if (dummyStorageDataItem is AvatarCardDataItem) { if (item.get_split_fragment_numSpecified()) { (dummyStorageDataItem as AvatarCardDataItem).SpliteToFragment((int)item.get_split_fragment_num()); } else { AvatarCardDataItem item2 = dummyStorageDataItem as AvatarCardDataItem; AvatarUnlockDialogContext dialogContext = new AvatarUnlockDialogContext(AvatarMetaDataReaderExtend.GetAvatarIDsByKey(item2.ID).avatarID, true); this._unLockAvatarDialogManager.AddDialog(dialogContext); } } this._gachaGotList.Add(dummyStorageDataItem); List <Tuple <StorageDataItemBase, bool> > itemDataList = new List <Tuple <StorageDataItemBase, bool> > { new Tuple <StorageDataItemBase, bool>(dummyStorageDataItem, item.get_is_rare_drop()) }; if (item.get_gift_item_idSpecified()) { StorageDataItemBase base3 = Singleton <StorageModule> .Instance.GetDummyStorageDataItem((int)item.get_gift_item_id(), (int)item.get_gift_level()); if (base3 != null) { base3.number = (int)item.get_gift_num(); itemDataList.Add(new Tuple <StorageDataItemBase, bool>(base3, false)); this._gachaGotList.Add(base3); } } this._dropItemShowDialogManager.AddDialog(new DropNewItemDialogContextV2(itemDataList)); } } this._waitGachaRsp.End(); } else if (rsp.get_retcode() == 3) { GeneralDialogContext context2 = new GeneralDialogContext { type = GeneralDialogContext.ButtonType.SingleButton, title = LocalizationGeneralLogic.GetText("Menu_Return_GachaTitcketLack", new object[0]), desc = LocalizationGeneralLogic.GetText("Menu_Return_GachaTitcketLack", new object[0]) }; Singleton <MainUIManager> .Instance.ShowDialog(context2, UIType.Any); } this.UpdateView(); return(false); }
private void InitAnimationAndDialogManager() { this._leftPanelAnimationManager = new SequenceAnimationManager(new Action(this.OnLeftPanelAnimationsEnd), null); this._playerLevelUpAndAvatarNewSkillDialogManager = new SequenceDialogManager(new Action(this.OnPlayerAvatarDialogsEnd)); this._dropPanelBGAnimationManager = new SequenceAnimationManager(new Action(this.OnDropPanelBGAniamtionEnd), null); this._dropNewItemDialogManager = new SequenceDialogManager(new Action(this.OnDropNewItemDialogsEnd)); this._dropItemAnimationManager = new SequenceAnimationManager(new Action(this.OnItemPanelAnimationEnd), null); this._dropScroller = base.view.transform.Find("RewardPanel/DropPanel/Drops/ScrollView").GetComponent <MonoGridScroller>(); this._leftPanelAnimationsEnd = false; this._playerAvatarDialogsEnd = false; this._dropPanelBGAniamtionEnd = false; }
public PlayerStatusWidgetContext() { ContextPattern pattern = new ContextPattern { contextName = "PlayerStatusWidgetContext", viewPrefabPath = "UI/Menus/Widget/PlayerStatusPanel", cacheType = ViewCacheType.AlwaysCached }; base.config = pattern; base.findViewSavedInScene = true; base.uiType = UIType.SuspendBar; this._achieveDialogManager = new SequenceDialogManager(new Action(this.< PlayerStatusWidgetContext > m__1AD)); }