|
|
@ -54,6 +54,7 @@ namespace Jumpy { |
|
|
|
|
|
|
|
// Called once per game. Loads all game content.
|
|
|
|
protected override void LoadContent() { |
|
|
|
Console.WriteLine("LoadContent()"); |
|
|
|
spriteBatch = new SpriteBatch(GraphicsDevice); |
|
|
|
font = Content.Load<SpriteFont>("font"); |
|
|
|
// TODO: decouple things like Player and World from their textures.
|
|
|
@ -86,6 +87,7 @@ namespace Jumpy { |
|
|
|
display.SetFullScreen(fullScreen); |
|
|
|
} |
|
|
|
|
|
|
|
List<Rectangle> collisionTargets = world.CollisionTargets(); |
|
|
|
player.Update(gameTime, gamePad); |
|
|
|
|
|
|
|
base.Update(gameTime); |
|
|
@ -132,6 +134,11 @@ namespace Jumpy { |
|
|
|
// Draw foreground tiles.
|
|
|
|
world.Draw(spriteBatch); |
|
|
|
|
|
|
|
// Draw debug rects.
|
|
|
|
foreach (var rect in world.CollisionTargets()) { |
|
|
|
DrawRect(spriteBatch, rect, Color.Yellow); |
|
|
|
} |
|
|
|
|
|
|
|
// Aaaaand we're done.
|
|
|
|
spriteBatch.End(); |
|
|
|
|
|
|
|