Guest User

Untitled

a guest
Jul 31st, 2012
58
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Value cannot be null.
  2. //Parameter name: spriteFont
  3.  
  4. ///Why?????
  5.  
  6.  
  7. using System;
  8. using System.Collections.Generic;
  9. using System.Linq;
  10. using System.Text;
  11.  
  12. using Microsoft.Xna.Framework;
  13. using Microsoft.Xna.Framework.Graphics;
  14. using Microsoft.Xna.Framework.Content;
  15.  
  16.  
  17. namespace Pong
  18. {
  19.     class DebuggingTools
  20.     {
  21.  
  22.         GraphicsDevice graphicsDevice;
  23.         SpriteBatch spriteBatch;
  24.         ContentManager contentManager;
  25.         SpriteFont arial;
  26.         SpriteFont gameFont;
  27.         GameplayScreen gameplayScreen;
  28.         GameTime gameTime;
  29.  
  30.         /// <summary>
  31.         /// Constructor
  32.         /// </summary>
  33.         public DebuggingTools()
  34.         {
  35.         }
  36.  
  37.  
  38.         public void LoadContent(ContentManager contentManager)
  39.         {
  40.             spriteBatch = new SpriteBatch(graphicsDevice);    
  41.             arial = contentManager.Load<SpriteFont>(@"gfx/fonts/Arial"); // for debugging text
  42.             gameFont = contentManager.Load<SpriteFont>(@"gfx/fonts/gamefont");
  43.    
  44.         }
  45.  
  46.         public void Draw(SpriteBatch spriteBatch)
  47.         {
  48.             spriteBatch.DrawString(arial, "test text", new Vector2(20, 45), Color.White);
  49.             spriteBatch.DrawString(gameFont, "Text", new Vector2(50,58), Color.White);
  50.         }
  51.  
  52.         public void Update(GameTime gameTime)
  53.         {
  54.         }
  55.  
  56.     }
  57. }
RAW Paste Data