URGENT MESSAGE, from no one in particular, get one of these important technologies before they are all gone.
This is a serious message from no one, but doesn't minimize the importance of the message.
No difference in how to use Fonts in XNA 3.1 over XNA 2.0. If you already know how to use text in your project, this won’t be a big help to you. This article was written to try to look a little smarter than my previous blog may have made me look.
Using the previous Blog approach, was simple, but not elegant.
It would be better to add text that indicates whether or not SpriteBatch is an abstract class or a base class.
In this case you will need to add an existing content resource to the project. The image below shows you how to add the spritefont material to the content folder. There is a link that gets you to a very clear way to implement text in your game project. Over future blogs we will go over how to add text, scoring and so forth to your game.
Follow the article on MSDN:
Use the diagram to the right to add the existing content templates, in this case Sprite Font.
public class Game1 : Microsoft.Xna.Framework.Game { GraphicsDeviceManager graphics; SpriteBatch spriteBatch;
//Add the two lines below
SpriteFont Font1; Vector2 FontPos;
//******************
Your code should look like:
Legal Note:
Restrictions: