private void onDecorationsLoaded(DecorationType decorationType)
        {
            switch (decorationType)
            {
            case DecorationType.Decoration:
                isDecorationInventoryLoaded = true;
                break;

            case DecorationType.Structure:
                isStructureInventoryLoaded = true;
                break;
            }
            if (!isDecorationInventoryLoaded || !isStructureInventoryLoaded)
            {
                return;
            }
            RecentDecorationsService recentDecorationsService = Service.Get <RecentDecorationsService>();

            if (recentDecorationsService.ShouldShowMostRecentPurchase)
            {
                string target      = "IglooScreenContainerContent";
                string targetEvent = "igloonone";
                bool   flag        = false;
                if (recentDecorationsService.MostRecentPurchaseType == DecorationType.Decoration)
                {
                    targetEvent = "igloofurnitureevent";
                    flag        = true;
                }
                else if (recentDecorationsService.MostRecentPurchaseType == DecorationType.Structure)
                {
                    targetEvent = "igloostructuresevent";
                    flag        = true;
                }
                if (flag)
                {
                    stateController.SendContextEvent(target, targetEvent);
                }
            }
        }
Пример #2
0
 public override void OnEnter()
 {
     SuspendActiveQuest();
     if (stateController != null)
     {
         if (stateController.IsFirstIglooLoad && Service.Get <SceneLayoutDataManager>().IsInOwnIgloo())
         {
             stateController.OpenManageIglooPopup();
         }
         stateController.SendContextEvent("IglooScreenContainerContent", "igloolotsevent");
     }
     loadingController = Service.Get <LoadingController>();
     if (!loadingController.HasLoadingSystem(this))
     {
         loadingController.AddLoadingSystem(this);
     }
     eventChannel.AddListener <IglooUIEvents.SetStateButtonPressed>(onSceneStateButton);
     eventChannel.AddListener <IglooUIEvents.CreateIglooButtonPressed>(onManageIglooCreatePressed);
     eventChannel.AddListener <IglooUIEvents.CloseManageIglooPopup>(onCloseManageIglooPopup);
     eventChannel.AddListener <IglooUIEvents.LotNextButtonPressed>(onLotNextButtonPressed);
     eventChannel.AddListener <IglooUIEvents.LotBackButtonPressed>(onLotBackButtonPressed);
     eventChannel.AddListener <IglooUIEvents.LotScreenReady>(onLotScreenReady);
 }