Ejemplo n.º 1
0
 /// <summary>
 /// Called when a scene is unloading, this is called by changeScene and Dispose.
 /// </summary>
 private void unloadScene()
 {
     if (movementSequenceController != null && movementSequenceController.Playing)
     {
         movementSequenceController.stopPlayback();
     }
     if (SceneUnloading != null && medicalController.CurrentScene != null)
     {
         SceneUnloading.Invoke(medicalController.CurrentScene);
     }
     if (anatomyController != null)
     {
         anatomyController.sceneUnloading();
     }
     if (sceneViewController != null)
     {
         sceneViewController.destroyCameras();
     }
     if (lightManager != null)
     {
         lightManager.sceneUnloading(medicalController.CurrentScene);
     }
 }
Ejemplo n.º 2
0
        internal static void Internal_OnSceneEvent(SceneEventType eventType, Scene scene, ref Guid sceneId)
        {
            switch (eventType)
            {
            case SceneEventType.Saving:
                SceneSaving?.Invoke(scene, sceneId);
                break;

            case SceneEventType.Saved:
                SceneSaved?.Invoke(scene, sceneId);
                break;

            case SceneEventType.SaveError:
                SceneSaveError?.Invoke(scene, sceneId);
                break;

            case SceneEventType.Loading:
                SceneLoading?.Invoke(scene, sceneId);
                break;

            case SceneEventType.Loaded:
                SceneLoaded?.Invoke(scene, sceneId);
                break;

            case SceneEventType.LoadError:
                SceneLoadError?.Invoke(scene, sceneId);
                break;

            case SceneEventType.Unloading:
                SceneUnloading?.Invoke(scene, sceneId);
                break;

            case SceneEventType.Unloaded:
                SceneUnloaded?.Invoke(scene, sceneId);
                break;
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Raises the scene loading event.
 /// </summary>
 private void RaiseSceneUnloadingEvent(string sceneName) =>
 SceneUnloading?.Invoke(this, new SceneEventArgs(sceneName));