A stealth-based 2D platformer where you don't have to kill anyone unless you want to. https://www.semicolin.games
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
677 B

  1. using Microsoft.Xna.Framework;
  2. using Microsoft.Xna.Framework.Graphics;
  3. namespace SemiColinGames {
  4. public static class Text {
  5. // Outlined text in black.
  6. public static void DrawOutlined(
  7. SpriteBatch spriteBatch, SpriteFont font, string text, Vector2 position, Color color) {
  8. for (int i = -1; i <= 1; i++) {
  9. for (int j = -1; j <= 1; j++) {
  10. if (i == 0 && j == 0) {
  11. continue;
  12. }
  13. Vector2 stencilPos = new Vector2(position.X + i, position.Y + j);
  14. spriteBatch.DrawString(font, text, stencilPos, Color.Black);
  15. }
  16. }
  17. spriteBatch.DrawString(font, text, position, color);
  18. }
  19. }
  20. }