Background

Piece

Highlight
These only show up if there is a legal move for the piece hovered over using the current dice.
To display them I am adding them to a spriteBatch:
To display them I am adding them to a spriteBatch:
// start collecting sprites
spriteBatch.Begin();
...// where to display the sprite
Vector2 tempVector = new Vector2(x, y);
// display piece (a Texture2D)
spriteBatch.Draw(piece, tempVector, Color.White);
...
// finished collecting sprites
spriteBatch.End();
That's all it takes to display a 2D board game, lots of sprites displayed in the right place. Not too difficult.
No comments:
Post a Comment