Ejemplo n.º 1
0
        /// Loaded once per game. Load all Game Content.
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            this.spriteBatch    = new SpriteBatch(GraphicsDevice);
            Systems.spriteBatch = this.spriteBatch;

            // Load Systems
            Systems.AddGame(this);
            Systems.AddFonts(this);
            Systems.AddGraphics(this, this.graphics, this.spriteBatch);
            Systems.screen.ResizeWindowToBestFit();
            Systems.AddAudio(this);
            UIHandler.Setup();
            //GlobalScene.Setup();

            this.renderTarget = new RenderTarget2D(graphics.GraphicsDevice, ScreenSys.VirtualWidth, ScreenSys.VirtualHeight, false, SurfaceFormat.Color, DepthFormat.None, 8, RenderTargetUsage.DiscardContents);

            // Resize Window
            Window.AllowUserResizing  = false;
            Window.ClientSizeChanged += new EventHandler <EventArgs>(Systems.screen.OnResizeWindow);
            //Window.Position = new Point(0, 24);

            Systems.screen.ResizeWindowToLargestFit();

            // Process Extra Loading Instructions
            loadInstructions();
        }