예제 #1
0
 void TransitionFinalize(ScenesTransitionSetupDataSO ignored1, DiContainer ignored2)
 {
     try {
         if (!GetCurrentEnvironment().name.StartsWith("Menu"))
         {
             try {
                 FindManager();
                 if (!Resources.FindObjectsOfTypeAll <PlayerDataModel>()[0].playerData.overrideEnvironmentSettings.overrideEnvironments)
                 {
                     InternalTempChangeToPlatform();
                     PlatformLoader.AddManagers();
                     SpawnCustomLights();
                     Instance.StartCoroutine(ReplaceAllMaterialsAfterOneFrame());
                     EnvironmentArranger.RearrangeEnvironment();
                     TubeLightManager.CreateAdditionalLightSwitchControllers();
                 }
             } catch (ManagerNotFoundException e) {
                 Plugin.Log(e);
             }
         }
         else
         {
             Heart.SetActive(showHeart);
             Heart.GetComponent <LightWithId>().ColorWasSet(Color.magenta);
         }
     } catch (EnvironmentSceneNotFoundException e) {
         Plugin.Log(e);
     }
 }
예제 #2
0
        internal static void InternalTempChangeToPlatform(int index)
        {
            // Hide current Platform
            currentPlatform.gameObject.SetActive(false);
            int oldIndex = platformIndex;

            // Increment index
            platformIndex = index % platforms.Length;

            // Show new platform
            currentPlatform.gameObject.SetActive(true);

            // Hide environment for new platform
            Instance.StartCoroutine(HideForPlatformAfterOneFrame(currentPlatform));

            // Update lightSwitchEvent TubeLight references
            TubeLightManager.UpdateEventTubeLightList();
            platformIndex = oldIndex;
        }