protected void OnLoad(object sender, EventArgs e) { spriteBatch = new SpriteBatch(); texture = new Texture(new Bitmap(@"Content/test.png")); sprite = new Sprite(texture); arial = new BitmapFont("Content/arial_test"); text = new Text(arial, "The quick brown fox \njumps over the lazy dog.", new Vector2(0, 256), Color.Black); fpsFont = new BitmapFont(@"Content/fps_font"); fpsCounter = new ClockDisplay(Game.Clock, fpsFont, Vector2.Zero, Color.Black); // White is also default camera = Camera.CreateOrthographic(Game.ClientSize.Width, Game.ClientSize.Height, -1, 1); }
public static void Draw(this SpriteBatch spriteBatch, ClockDisplay display) { display.Draw(spriteBatch); }