Gerard-Meier

Pixel class

Apr 15th, 2011
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.68 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using Microsoft.Xna.Framework;
  6. using SeriousGameLib;
  7. using Microsoft.Xna.Framework.Graphics;
  8.  
  9. namespace Fotograaf
  10. {
  11.     public class Pixel
  12.     {
  13.         public static Texture2D Texture = null;
  14.  
  15.  
  16.         public static void Draw(Microsoft.Xna.Framework.Graphics.SpriteBatch spriteBatch, Vector2 position)
  17.         {
  18.             if (Texture == null) Texture = GameObject.Content.Load<Texture2D>("Fotograaf/Images/cross");
  19.                
  20.             spriteBatch.Draw(Texture, new Vector2(position.X - Texture.Width / 2, position.Y - Texture.Height / 2), Color.White);
  21.         }
  22.  
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment