コード例 #1
0
        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;
        }