예제 #1
0
 internal void presentScene(DScene scene)
 {
     DGame.current.contentManager.unload();
     this.scene     = scene;
     DScene.current = scene;
     scene.load();
     scene.updateSize(size);
     GC.Collect();
 }
예제 #2
0
        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;
        }