Exemplo n.º 1
0
 public void Init(ClothingDesignerDependencies dependencies)
 {
     this.dependencies = dependencies;
     eventChannel      = new EventChannel(ClothingDesignerContext.EventBus);
     eventChannel.AddListener <ClothingDesignerUIEvents.CloseButton>(onCloseButton);
     eventChannel.AddListener <ClothingDesignerUIEvents.ChangeStateInventory>(onStateChangeInventory);
     eventChannel.AddListener <ClothingDesignerUIEvents.ChangeStateCustomizer>(onStateChangeCustomizer);
     eventChannel.AddListener <ClothingDesignerUIEvents.ShowCatalog>(onShowCatalog);
     eventChannel.AddListener <ClothingDesignerUIEvents.HideCatalog>(onHideCatalog);
     eventChannel.AddListener <ClothingDesignerUIEvents.CameraPositionChangeComplete>(onCameraTransitionComplete);
     eventChannel.AddListener <ClothingDesignerUIEvents.ShowMemberFlow>(onShowMemberFlow);
     eventChannel.AddListener <ClothingDesignerUIEvents.ShowSubmittedInCatalog>(onShowSubmittedInCatalog);
     customizerEventChannel = new EventChannel(CustomizationContext.EventBus);
     customizerEventChannel.AddListener <ClothingDesignerUIEvents.CustomizerEditingState>(onCustomizerEditState);
     customizerEventChannel.AddListener <ClothingDesignerUIEvents.CustomizerTemplateState>(onCustomizerTemplateState);
     customizerEventChannel.AddListener <CustomizerUIEvents.SelectTemplate>(onCustomizerTemplateSelected);
     inventoryEventChannel = new EventChannel(InventoryContext.EventBus);
     inventoryEventChannel.AddListener <ClothingDesignerUIEvents.ShowAllTemplates>(onShowAllTemplates);
     inventoryEventChannel.AddListener <ClothingDesignerUIEvents.ShowEquippedItems>(onShowEquippedItems);
     inventoryEventChannel.AddListener <ClothingDesignerUIEvents.ShowHiddenItems>(onShowHiddenItems);
     inventoryEventChannel.AddListener <ClothingDesignerUIEvents.CategoryChange>(onInventoryChangeCategory);
     catalogEventChannel = new EventChannel(CatalogContext.EventBus);
     catalogEventChannel.AddListener <CatalogUIEvents.AcceptChallengeClickedEvent>(onAcceptChallengeClickEvent);
     penguinLighting = GameObject.Find("Realtime Directional Light");
     hideCatalog();
     loadInventory();
     Service.Get <ICPSwrveService>().Action("view.my_style");
     showCatalogCustomizer = false;
 }
Exemplo n.º 2
0
        private void Start()
        {
            setPresenceData();
            controller = new ClothingDesignerController();
            controller.ControllerIsInitializing += onControllerReady;
            ClothingDesignerDependencies clothingDesignerDependencies = new ClothingDesignerDependencies();

            clothingDesignerDependencies.CustomizerAvatarPreview = customizerAvatarPreview;
            clothingDesignerDependencies.ScreenContent           = screenContent;
            clothingDesignerDependencies.CatalogContainer        = catalogContainer;
            clothingDesignerDependencies.ScreenContainer         = screenContainer;
            clothingDesignerDependencies.LoadingIndicator        = loadingIndicator;
            clothingDesignerDependencies.DefaultChannelTextures  = defaultChannelTextures;
            controller.Init(clothingDesignerDependencies);
            GameStateController gameStateController = Service.Get <GameStateController>();

            if (!gameStateController.IsFTUEComplete && Service.Get <QuestService>().ActiveQuest.Id == gameStateController.FTUEConfig.FtueQuestId)
            {
                isTutorialRunning    = true;
                backButtonController = Service.Get <BackButtonController>();
                if (backButtonController != null)
                {
                    backButtonController.IsEnabled = false;
                }
            }
        }