Example #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()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(Game.GraphicsDevice);



#if DEBUG
            _fpsCounter = new FPSCounter(Game);

            Game.Components.Add(_fpsCounter);
#endif
            _crossair = Game.Content.Load <Texture2D>(@"Textures\crossair");

            _crossairMiddle = new Vector2(Game.GraphicsDevice.Viewport.Width / 2 - _crossair.Width / 2,
                                          Game.GraphicsDevice.Viewport.Height / 2 - _crossair.Height / 2);

            _font1 = Game.Content.Load <SpriteFont>(@"Fonts\Segoi");
        }
Example #2
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(Game.GraphicsDevice);

            #if DEBUG
            _fpsCounter = new FPSCounter(Game);

            Game.Components.Add(_fpsCounter);
            #endif
            _crossair = Game.Content.Load<Texture2D>(@"Textures\crossair");

            _crossairMiddle = new Vector2(Game.GraphicsDevice.Viewport.Width / 2 - _crossair.Width / 2,
                                          Game.GraphicsDevice.Viewport.Height / 2 - _crossair.Height / 2);

            _font1 = Game.Content.Load<SpriteFont>(@"Fonts\Segoi");
        }