private IEnumerator loadScreenContent(string screenName, ClothingDesignerState transitionState)
    {
        AssetRequest <GameObject> assetRequest = Content.LoadAsync(screenPrefabKey, screenName);

        yield return(assetRequest);

        if (currentLoadedScreen != null)
        {
            UnityEngine.Object.Destroy(currentLoadedScreen.gameObject);
            currentLoadedScreen = null;
            dependencies.LoadingIndicator.SetActive(value: true);
        }
        currentLoadedScreen = UnityEngine.Object.Instantiate(assetRequest.Asset).transform;
        currentLoadedScreen.SetParent(dependencies.ScreenContainer, worldPositionStays: false);
        currentLoadedScreen.gameObject.SetActive(value: true);
        while (!cameraTransitionComplete)
        {
            yield return(null);
        }
        dependencies.LoadingIndicator.SetActive(value: false);
        if (currentState == transitionState && !isNewScreenInitialized)
        {
            initializeNewState();
        }
    }
 private void showCatalog()
 {
     isFromCatalog = true;
     currentState  = ClothingDesignerState.Catalog;
     dependencies.ScreenContent.SetActive(value: false);
     dependencies.CatalogContainer.SetActive(value: true);
     penguinLighting.SetActive(value: false);
 }
 private void setDefaultScreen()
 {
     currentState = ClothingDesignerState.Initializing;
     if (this.ControllerIsInitializing != null)
     {
         this.ControllerIsInitializing();
     }
     updateScreen(ClothingDesignerState.Inventory, "InventoryEquipmentScreen", initialScreen: true);
 }
 private void updateScreen(ClothingDesignerState newState, string screenName, bool initialScreen = false)
 {
     if (newState != currentState)
     {
         cameraTransitionComplete = initialScreen;
         isNewScreenInitialized   = false;
         currentState             = newState;
         ClothingDesignerContext.EventBus.DispatchEvent(default(ClothingDesignerUIEvents.EnableDragAreaControllerUpdates));
         CoroutineRunner.Start(loadScreenContent(screenName, newState), this, "loadScreenContent");
     }
 }
 private bool onCustomizerTemplateState(ClothingDesignerUIEvents.CustomizerTemplateState evt)
 {
     currentState = ClothingDesignerState.Customizer;
     return(false);
 }
 private bool onCustomizerEditState(ClothingDesignerUIEvents.CustomizerEditingState evt)
 {
     currentState = ClothingDesignerState.Editing;
     return(false);
 }