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

            _font = Content.Load <SpriteFont>("ButtonFont");

            _exitButton = new BasicButton(new Vector2(100, 100), 50, 100, _font, Color.White, Color.Yellow, Color.Green, "Exit");
            _exitButton.LoadContent(GraphicsDevice);

            // TODO: use this.Content to load your game content here
            _standDownAnimation.LoadContent(Content);
            _standLeftAnimation.LoadContent(Content);
            _standRightAnimation.LoadContent(Content);
            _standUpAnimation.LoadContent(Content);

            _walkDownAnimation.LoadContent(Content);
            _walkLeftAnimation.LoadContent(Content);
            _walkRightAnimation.LoadContent(Content);
            _walkUpAnimation.LoadContent(Content);
        }