|
@ -45,7 +45,7 @@ namespace SemiColinGames { |
|
|
GC.SuppressFinalize(this); |
|
|
GC.SuppressFinalize(this); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public void Draw(World world, Player player, LinesOfSight linesOfSight) { |
|
|
|
|
|
|
|
|
public void Draw(World world, Player player, LinesOfSight linesOfSight, bool paused) { |
|
|
graphics.SetRenderTarget(null); |
|
|
graphics.SetRenderTarget(null); |
|
|
graphics.Clear(backgroundColor); |
|
|
graphics.Clear(backgroundColor); |
|
|
if (!Enabled) { |
|
|
if (!Enabled) { |
|
@ -94,6 +94,28 @@ namespace SemiColinGames { |
|
|
// Draw debug rects & lines on top.
|
|
|
// Draw debug rects & lines on top.
|
|
|
Debug.Draw(graphics, basicEffect); |
|
|
Debug.Draw(graphics, basicEffect); |
|
|
|
|
|
|
|
|
|
|
|
// Draw in-world UI on top of everything.
|
|
|
|
|
|
// TODO: make a Text.cs file and move things like "black outlined text" there.
|
|
|
|
|
|
if (paused) { |
|
|
|
|
|
string text = "Paused"; |
|
|
|
|
|
Vector2 size = Textures.BannerFont.MeasureString(text); |
|
|
|
|
|
Vector2 position = new Vector2((camera.Width - size.X) / 2, (camera.Height - size.Y) / 2); |
|
|
|
|
|
|
|
|
|
|
|
spriteBatch.Begin( |
|
|
|
|
|
SpriteSortMode.Deferred, null, SamplerState.LinearWrap, null, null, null, null); |
|
|
|
|
|
for (int i = -1; i <= 1; i++) { |
|
|
|
|
|
for (int j = -1; j <= 1; j++) { |
|
|
|
|
|
if (i == 0 && j == 0) { |
|
|
|
|
|
continue; |
|
|
|
|
|
} |
|
|
|
|
|
Vector2 stencilPos = new Vector2(position.X + i, position.Y + j); |
|
|
|
|
|
spriteBatch.DrawString(Textures.BannerFont, text, stencilPos, Color.Black); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
spriteBatch.DrawString(Textures.BannerFont, text, position, Color.White); |
|
|
|
|
|
spriteBatch.End(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// Get ready to draw sceneTarget to screen.
|
|
|
// Get ready to draw sceneTarget to screen.
|
|
|
graphics.SetRenderTarget(null); |
|
|
graphics.SetRenderTarget(null); |
|
|
|
|
|
|
|
|