LoadContent() public method

public LoadContent ( ) : void
return void
示例#1
0
        /// <summary>
        /// Load your graphics content.
        /// </summary>
        protected override void LoadContent()
        {
            _spriteBatch  = new SpriteBatch(GraphicsDevice);
            _lineBatch    = new LineBatch(GraphicsDevice);
            _assetCreator = new AssetCreator(GraphicsDevice);
            _assetCreator.LoadContent(_contentManager);
            _input.LoadContent();

            // Tell each of the screens to load their content.
            foreach (GameScreen screen in _screens)
            {
                screen.LoadContent();
            }
        }
        /// <summary>
        /// Load your graphics content.
        /// </summary>
        protected override void LoadContent()
        {
            SpriteBatch = new SpriteBatch(GraphicsDevice);
            LineBatch   = new LineBatch(GraphicsDevice);
            Assets      = new AssetCreator(GraphicsDevice);
            Assets.LoadContent(Content);
            _input.LoadContent();

            // Tell each of the screens to load their content.
            foreach (GameScreen screen in _screens)
            {
                screen.LoadContent();
            }
        }