Browse Source

Cycle through levels when player hits the "restart level" button.

GitOrigin-RevId: bbe909515f
master
Colin McMillen 4 years ago
parent
commit
b858c45b7e
  1. 4
      Shared/SneakGame.cs

4
Shared/SneakGame.cs

@ -24,6 +24,7 @@ namespace SemiColinGames {
// attempt to draw the scene. This is a workaround for the fact that otherwise the first few
// frames can be really slow to draw.
int framesToSuppress;
int levelIdx = 0;
Scene scene;
Player player;
@ -72,8 +73,9 @@ namespace SemiColinGames {
framesToSuppress = 2;
camera = new Camera();
player = new Player();
world = new World(Levels.ONE_ONE);
world = new World(Levels.ALL_LEVELS[levelIdx % Levels.ALL_LEVELS.Length]);
scene = new Scene(GraphicsDevice, camera);
levelIdx++;
}
// Called once per game. Unloads all game content.

Loading…
Cancel
Save