private IEnumerator WaitForUIToUpdate(CatalogUIEvents.ShowItemsForThemeEvent evt)
        {
            yield return(new WaitForSeconds(0.1f));

            tints = Service.Get <CatalogServiceProxy>().themeColors.GetColorsByIndex(Service.Get <CatalogServiceProxy>().CurrentThemeIndex);
            clothingCatalogItemId = evt.ClothingCatalogItemId;
            if (clothingCatalogItemId != -1)
            {
                SubmissionCompletePanel.gameObject.SetActive(value: true);
                SubmissionCompletePanel.EquipSubmittedItem();
                CoroutineRunner.Start(PlayCoinsAnimation(), this, "PlayCoinsAnimation");
                Service.Get <CatalogServiceProxy>().cache.ClearCache();
            }
            shopScroller.ClearData();
            isSubNavSetForCurrentList = false;
            Model.State    = CatalogState.ItemsView;
            subNavCategory = "All";
            currentTheme   = evt.Theme;
            if (!isNavInited)
            {
                Service.Get <CatalogServiceProxy>().GetCatalogItemsByRecent(currentTheme.scheduledThemeChallengeId);
            }
            else
            {
                CatalogContext.EventBus.DispatchEvent(default(CatalogUIEvents.SelectCategoryButtonAll));
            }
        }
 private bool onShowItemsForThemeEvent(CatalogUIEvents.ShowItemsForThemeEvent evt)
 {
     CreateScroller();
     shopScroller.Scroller.Initilize();
     base.gameObject.SetActive(value: true);
     CoroutineRunner.Start(WaitForUIToUpdate(evt), this, "WaitForUIToUpdate");
     return(false);
 }
Example #3
0
        private bool onCatalogChallengeSelected(CatalogUIEvents.ShowItemsForThemeEvent evt)
        {
            long scheduledThemeChallengeId           = evt.Theme.scheduledThemeChallengeId;
            CatalogThemeDefinition themeByScheduelId = Service.Get <CatalogServiceProxy>().GetThemeByScheduelId(scheduledThemeChallengeId);

            HeaderText.text = Service.Get <Localizer>().GetTokenTranslation(themeByScheduelId.Title);
            return(false);
        }