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); }
/// <summary> /// Add a sprite to the current batch. /// </summary> /// <param name="sprite">Sprite to be added.</param> public void Add(Sprite sprite) { spritesToDraw.Add(sprite); }