Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Value cannot be null.
- //Parameter name: spriteFont
- ///Why?????
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using Microsoft.Xna.Framework;
- using Microsoft.Xna.Framework.Graphics;
- using Microsoft.Xna.Framework.Content;
- namespace Pong
- {
- class DebuggingTools
- {
- GraphicsDevice graphicsDevice;
- SpriteBatch spriteBatch;
- ContentManager contentManager;
- SpriteFont arial;
- SpriteFont gameFont;
- GameplayScreen gameplayScreen;
- GameTime gameTime;
- /// <summary>
- /// Constructor
- /// </summary>
- public DebuggingTools()
- {
- }
- public void LoadContent(ContentManager contentManager)
- {
- spriteBatch = new SpriteBatch(graphicsDevice);
- arial = contentManager.Load<SpriteFont>(@"gfx/fonts/Arial"); // for debugging text
- gameFont = contentManager.Load<SpriteFont>(@"gfx/fonts/gamefont");
- }
- public void Draw(SpriteBatch spriteBatch)
- {
- spriteBatch.DrawString(arial, "test text", new Vector2(20, 45), Color.White);
- spriteBatch.DrawString(gameFont, "Text", new Vector2(50,58), Color.White);
- }
- public void Update(GameTime gameTime)
- {
- }
- }
- }
RAW Paste Data