コード例 #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(GraphicsDevice);
            _particleManager.LoadContent(Content, GraphicsDevice);
            _screenManager.LoadContent(Content, GraphicsDevice);
            var gameScreen = new UIGameScreen();

            _screenManager.Add(SCREEN_STATE.InGameScreen, gameScreen, true);
            gameScreen.AddItem(new Rectangle(GraphicsDevice.Viewport.Width - 149, GraphicsDevice.Viewport.Height - 40, 148, 30), "New Game", null, ShowNewGameDialog);

            //screenManager.Add(SCREEN_STATE.IN_GAME_SCREEN, ingame_screen, true);
            _drawDriver.LoadContent(GraphicsDevice, Content, _particleManager);
            _font = Content.Load<SpriteFont>("SpriteFont1");
            bolt = new Lightning(_lightingBoltStart, _lightingBoltEnd);
            bolt.LoadContent(Content,GraphicsDevice);
        }