Commit 9aed72e4 authored by Terence Martin's avatar Terence Martin

Render scores and reset on maze generation

This will need to be tweaked when we have multiple rounds, but it's
good enough for now.

The scores are unadorned, but are enough for us to be able to track
what is going on.
parent 2dc295c4
......@@ -4615,6 +4615,8 @@ var nurdz;
this._droppingFinalBall = false;
// Now generate the contents of the maze.
this._generator.generate();
// Reset the scores
game.resetScores();
// If there is a listener, tell it now that the generation has
// completed.
if (this._listener != null)
......@@ -5040,6 +5042,8 @@ var nurdz;
// entities get painted.
this._renderer.fillRect(0, 0, this._stage.width, this._stage.height, '#000');
_super.prototype.render.call(this);
// Now render the score.
game.renderScores(this._renderer);
};
/**
* This gets invoked by our maze entity when it has finished generating
......
......@@ -1224,6 +1224,9 @@ module nurdz.game
// Now generate the contents of the maze.
this._generator.generate ();
// Reset the scores
resetScores ();
// If there is a listener, tell it now that the generation has
// completed.
if (this._listener != null)
......
......@@ -477,6 +477,9 @@ module nurdz.game
// entities get painted.
this._renderer.fillRect (0, 0, this._stage.width, this._stage.height, '#000');
super.render ();
// Now render the score.
renderScores (this._renderer);
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment