mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
This commit is contained in:
parent
502cf72a7e
commit
c87997c774
13 changed files with 134 additions and 27 deletions
|
|
@ -82,6 +82,7 @@
|
|||
|
||||
Channel.prototype.onEndRound = function() {
|
||||
var self = this;
|
||||
this.gameController.endRound();
|
||||
this.broadcastControlCommand("endRound", true);
|
||||
|
||||
console.checkpoint("End Round (" + this.name + ") - Begin Round in " + Settings.CHANNEL_END_ROUND_TIME + " seconds");
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ function (Parent, PhysicsEngine, Settings, PlayerController, requestAnimFrame, N
|
|||
this.animationTimeout = null;
|
||||
this.worldUpdateTimeout = null;
|
||||
this.spawnTimeouts = [];
|
||||
this.roundHasEnded = false;
|
||||
|
||||
Parent.call(this, options);
|
||||
|
||||
|
|
@ -214,6 +215,14 @@ function (Parent, PhysicsEngine, Settings, PlayerController, requestAnimFrame, N
|
|||
this.spawnPlayer(player, 0);
|
||||
};
|
||||
|
||||
GameController.prototype.endRound = function() {
|
||||
this.roundHasEnded = true;
|
||||
|
||||
for(var id in this.players) {
|
||||
this.players[id].getPlayerController().setIsInBetweenGames(true);
|
||||
}
|
||||
};
|
||||
|
||||
// FIXME: remove this method
|
||||
GameController.prototype.onResetLevel = function(userId) {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue