|
|
@ -56,8 +56,7 @@ namespace SemiColinGames { |
|
|
|
GC.SuppressFinalize(this); |
|
|
|
} |
|
|
|
|
|
|
|
public void Draw( |
|
|
|
bool isRunningSlowly, World world, Player player, LinesOfSight linesOfSight, bool paused) { |
|
|
|
public void Draw(bool isRunningSlowly, World world, LinesOfSight linesOfSight, bool paused) { |
|
|
|
graphics.SetRenderTarget(null); |
|
|
|
graphics.Clear(backgroundColor); |
|
|
|
|
|
|
@ -100,7 +99,7 @@ namespace SemiColinGames { |
|
|
|
world.DrawBackground(spriteBatch); |
|
|
|
|
|
|
|
// Draw player.
|
|
|
|
player.Draw(spriteBatch); |
|
|
|
world.Player.Draw(spriteBatch); |
|
|
|
|
|
|
|
// Draw foreground tiles.
|
|
|
|
world.DrawForeground(spriteBatch); |
|
|
@ -112,9 +111,9 @@ namespace SemiColinGames { |
|
|
|
// Draw in-world UI on top of everything.
|
|
|
|
spriteBatch.Begin( |
|
|
|
SpriteSortMode.Deferred, null, SamplerState.PointClamp, null, null, null, null); |
|
|
|
for (int i = 0; i < player.MaxHealth; i++) { |
|
|
|
for (int i = 0; i < world.Player.MaxHealth; i++) { |
|
|
|
Vector2 pos = new Vector2(16 + 15 * i, 8); |
|
|
|
if (player.Health > i) { |
|
|
|
if (world.Player.Health > i) { |
|
|
|
spriteBatch.Draw(Textures.Heart.Get, pos, new Rectangle(0, 0, 16, 16), Color.White); |
|
|
|
} else { |
|
|
|
spriteBatch.Draw(Textures.Heart.Get, pos, new Rectangle(16, 0, 16, 16), Color.White); |
|
|
|