protected virtual void SetActiveScene(Scene scene) { if (lastActiveScene != null) { renderSystem.RemoveComponent(lastActiveScene.Name + "Renderer"); updateSystem.RemoveComponent(lastActiveScene.Name + "Updater"); } renderSystem.ActiveScene = scene; if (scene != null) { updateSystem.AddComponent(new KeyValuePair <string, UpdateableComponent>(scene.Name + "Updater", scene.sceneUpdater)); } lastActiveScene = scene; }