예제 #1
0
파일: Main.cs 프로젝트: DmitGR/MonoDevGame
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            if (Info)
            {
                IsMouseVisible = true;
            }
            menuBatch = spriteBatch;
            pause.Load(Content);
            player.Load(Content);
            mainmenu.Load(Content);
            options.Load(Content);
            levelComplete.Load(Content);
            gameOver.Load(Content);
            hudFont          = Content.Load <SpriteFont>("Hud");
            Map.Content      = Content;
            BlockSize        = new Vector2(BlockWidth, BlockHeight);
            death            = new Animation(Content.Load <Texture2D>("Textures/Hero/death"), 65, 0.8f, false);
            CanCompleteLevel = true;

            GameTheme = Content.Load <Song>("Sounds/GameTheme");
            camera    = new Camera(GraphicsDevice.Viewport);
            backpos   = new Vector2(camera.Center.X, camera.Center.Y);


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