SpriterBetaXNA/SpriterBetaXNA/Game1.cs
/// <summary>
/// LoadContent will be called once per game and is the place to load
/// all of your content.
/// </summary>
LoadContent will be called once per game and is the place to load
all of your content.
LoadContent will be called once per game and is the place to load all of your content .
protected override void LoadContent() {
      spriteBatch = new SpriteBatch(GraphicsDevice);
      guiFont = Content.Load<SpriteFont>("fonts/gui-font");
      charNamePos = new Vector2(32, 8);
      animNamePos = charNamePos + new Vector2(0, guiFont.LineSpacing);
      SpriterCharacterData animData = Content.Load<SpriterCharacterData>("characters/BetaFormatHero");
      hero = new SpriterCharacter(animData);
      hero.Position = new Vector2(graphics.GraphicsDevice.Viewport.Width / 2, graphics.GraphicsDevice.Viewport.Height / 2);
      hero.CurrentSequence = 0;
    }
protected override void LoadContent ( ) { spriteBatch = new SpriteBatch ( GraphicsDevice ) ; guiFont = Content . Load < SpriteFont > ( " " ) ; charNamePos = new Vector2 ( 32 , 8 ) ; animNamePos = charNamePos + new Vector2 ( 0 , guiFont . LineSpacing ) ; SpriterCharacterData animData = Content . Load < SpriterCharacterData > ( " " ) ; hero = new SpriterCharacter ( animData ) ; hero . Position = new Vector2 ( graphics . GraphicsDevice . Viewport . Width / 2 , graphics . GraphicsDevice . Viewport . Height / 2 ) ; hero . CurrentSequence = 0 ; }
LoadContent will be called once per game and is the place to load
all of your content.
LoadContent will be called once per game and is the place to load all of your content .
// Create a new SpriteBatch, which can be used to draw textures. // load font // load spriter data // now create a new spriter character with this data // position in the middle of the screen // and set animation sequence