internal void presentScene(DScene scene) { DGame.current.contentManager.unload(); this.scene = scene; DScene.current = scene; scene.load(); scene.updateSize(size); GC.Collect(); }
void initializeWindowEventHandlers() { EventHandler <EventArgs> eventHandler = (sender, e) => { graphicsDeviceManager.PreferredBackBufferWidth = (int)size.X; graphicsDeviceManager.PreferredBackBufferHeight = (int)size.Y; graphicsDeviceManager.ApplyChanges(); scene.updateSize(size); }; Window.OrientationChanged += eventHandler; Window.ClientSizeChanged += eventHandler; }