コード例 #1
0
ファイル: Game1.cs プロジェクト: elorense/Platformer
        /// <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);
            menuScreen = new MenuScreen(this);
            mGameWorld = new World(this);
            camera = new Camera(spriteBatch, this);
            mGameWorld.worldWidth = Width;
            mGameWorld.worldHeight = Height;
            mGameWorld.camera = camera;

            mGameWorld.menuScreen = menuScreen;
            mGameWorld.LoadContent(Content);
            menuScreen.LoadContent();
            // TODO: use this.Content to load your game content here
        }