/// <summary> /// Adds a scene to the list available to be rendered. /// </summary> public static void AddScene(string identifier, string name, Camera.Camera camera, Instance instance, RenderState state, SceneType type) { for (int i = 0; i < scenes.Count; i++) { if (scenes[i].Identifier == identifier) { ActiveSceneName = identifier; return; } } SceneState newScene = new SceneState(identifier, name, camera, instance, state, type); scenes.Add(newScene); if (SceneAdded != null) { SceneAdded(newScene); } }
/// <summary> /// Removes a scene from the list available to be rendered. /// </summary> public static void RemoveScene(string name) { for (int i = 0; i < scenes.Count; i++) { if (scenes[i].Identifier == name) { if (sceneIndex >= i) { sceneIndex--; } SceneState scene = scenes[i]; scenes.RemoveAt(i); if (SceneRemoved != null) { SceneRemoved(scene); } break; } } }