public static void RevertScene()
 {
     ImageLoader.CancelMapper();
     SelectorUIItem.NameToAsset();
     UIContentGetter.KillSubImageManager();
     SpecialScene.KillSubMaterialManager();
 }
 public static void BuildScene()
 {
     ImageLoader.BuildImageMapper();
     SelectorUIItem.AssetToName();
     UIContentGetter.BuildSubImageManager();
     SpecialScene.BuildSubMaterialManager();
 }
Ejemplo n.º 3
0
        public void LoadScene(SpecialScene specialScene)
        {
            // Unload active scene
            if (activeScene != null)
            {
                var activeScenePath = specialScenePaths[specialScene];
                SceneManager.UnloadSceneAsync(activeScenePath);
            }

            // Load scene
            var newScenePath = specialScenePaths[specialScene];

            activeScene = specialScene;
            SceneManager.LoadSceneAsync(newScenePath, LoadSceneMode.Additive);
        }
    public void ExitSpecialScene()
    {
        if (!currentSpecialScene)
        {
            return;
        }

        currentSpecialScene.OnExitSpecialScene();
        status = statusBeforeSpecialScene;
        currentSpecialScene = null;
        CameraCharacter.Singleton.PopView(true);

        if (currentHoldingPanorama != null && !currentHoldingPanorama.bundleDownloaded)
        {
            currentHoldingPanorama.DownloadAssetBundle();
        }
    }
    public void EnterSpecialScene(string sceneName)
    {
        if (currentSpecialScene != null)
        {
            return;
        }

        foreach (var s in allSpecialScenes)
        {
            if (s == null)
            {
                continue;
            }
            if (s.specialSceneName == sceneName)
            {
                currentSpecialScene = s;
                break;
            }
        }

        if (currentSpecialScene == null)
        {
            return;
        }
        var ret = new CameraCharacter.ViewParameters();

        ret.viewMode        = currentSpecialScene.sceneViewMode;
        ret.viewContentType = currentSpecialScene.sceneViewContentType;
        ret.cameraZOffset   = 0f;
        ret.initialPosition = currentSpecialScene.sceneViewCenter.position;
        ret.initialRotation = currentSpecialScene.sceneViewCenter.rotation;
        ret.forceFading     = true;

        if (currentSpecialScene.sceneViewContentType == ViewContentType.PanoramaView && currentSpecialScene.viewContentDelegation != null)
        {
            currentSpecialScene.viewContentDelegation.DownloadAssetBundle();
            ret.FadeInFlag = currentSpecialScene.viewContentDelegation.PanoramaContentReady;
        }

        statusBeforeSpecialScene = status;
        status = BlockCombinationStatus.SpecialScene;
        CameraCharacter.Singleton.PushView(ret, true);
        currentSpecialScene.OnEnterSpecialScene();
    }