Exemple #1
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            spriteBatch = new SpriteBatch(GraphicsDevice);
            //spriteFont = Content.Load<SpriteFont>("font");
            basicEffect = new BasicEffect(GraphicsDevice);
            basicEffect.VertexColorEnabled = true;

            MonoGameDebugDraw._batch = spriteBatch;
            MonoGameDebugDraw._device = GraphicsDevice;
            MonoGameDebugDraw._font = spriteFont;

            oldState = Keyboard.GetState();
            oldGamePad = GamePad.GetState(PlayerIndex.One);

            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            _model.setPanel(this);
            _controller = new TestbedController(_model, UpdateBehavior.UPDATE_CALLED, MouseBehavior.NORMAL, new MonoGameTestbedError());

            _debugDraw = new MonoGameDebugDraw();
            _model.setDebugDraw(_debugDraw);
            TestList.populateModel(_model);

            _controller.playTest(7);
            _controller.start();

            Resize(GraphicsDevice.PresentationParameters.BackBufferWidth, GraphicsDevice.PresentationParameters.BackBufferHeight);
        }