示例#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);

            var animations = spriteLoader.GetAnimationDictionary(Content);

            stageManager.AddStage(new Stage(objectInitialiser.LoadStage(animations, 1, gameWidth, gameHeight), new Background(Content.Load <Texture2D>("Environment/Desert"), new Rectangle(0, 0, 1279, 639))));
            stageManager.AddPlayer(objectInitialiser.LoadPlayer(animations));
            stageManager.GetPlayer().Position = new Vector2(69, 887);

            hero       = (PlayerGameObject)stageManager.GetPlayer();
            spriteFont = Content.Load <SpriteFont>("Misc/basicFont");
            // TODO: use this.Content to load your game content here
        }