Hides playercontroller within player

In order to not provide deep exposure to PlayerController,
we refactored it so that it is not visible anymore outside Player.

Also we renamed isInBetweenGames to inBetweenRounds.

Moved creation of PlayerController from GameController(s) to
The channel Player and client Me.
This commit is contained in:
logsol 2016-10-01 12:11:27 +02:00
parent 8d8a55cc8c
commit fc7866f11e
7 changed files with 24 additions and 27 deletions

View file

@ -11,7 +11,7 @@ function () {
this._isJumping;
this._walkingDirectionStatus = 0;
this.isInBetweenGames = false;
this.inBetweenRounds = false;
}
PlayerController.prototype.moveLeft = function () {
@ -46,12 +46,12 @@ function () {
if(options) this.player.lookAt(options.x, options.y);
}
PlayerController.prototype.setIsInBetweenGames = function(isInBetweenGames) {
this.isInBetweenGames = !!isInBetweenGames;
PlayerController.prototype.setInBetweenRounds = function(inBetweenRounds) {
this.inBetweenRounds = !!inBetweenRounds;
};
PlayerController.prototype.isPlayerInputAllowed = function() {
return !this.isInBetweenGames;
return !this.inBetweenRounds;
};
PlayerController.prototype.update = function () {