fixes #147, fixes #136, is related to but doesnt entirely complete #144

This commit is contained in:
logsol 2016-08-28 22:40:25 +02:00
parent 502cf72a7e
commit c87997c774
13 changed files with 134 additions and 27 deletions

View file

@ -130,6 +130,10 @@ function (Parent, Box2D, PhysicsEngine, ViewManager, PlayerController, Nc, reque
};
*/
GameController.prototype.onRemoveGameObject = function(options) {
};
GameController.prototype.updateGameObject = function (gameObject, gameObjectUpdate) {
if(gameObject === this.me.doll) {
this.me.setLastServerPositionState(gameObjectUpdate);
@ -252,6 +256,17 @@ function (Parent, Box2D, PhysicsEngine, ViewManager, PlayerController, Nc, reque
Nc.trigger(Nc.ns.client.view.gameStats.toggle, show);
};
GameController.prototype.beginRound = function() {
if (this.me.getPlayerController()) {
this.me.getPlayerController().setIsInBetweenGames(false);
}
};
GameController.prototype.endRound = function() {
this.me.getPlayerController().setIsInBetweenGames(true);
this.toggleGameStats(true);
};
GameController.prototype.destroy = function() {
if (!window.cancelAnimationFrame) {