diff --git a/app/Game/Client/AudioPlayer.js b/app/Game/Client/AudioPlayer.js index f2f71da..851cbbb 100644 --- a/app/Game/Client/AudioPlayer.js +++ b/app/Game/Client/AudioPlayer.js @@ -25,8 +25,8 @@ function () { } AudioPlayer.prototype.stop = function() { - this.audio.stop(); - this.doPlay = false; + //this.audio.stop(); + //this.doPlay = false; }; AudioPlayer.prototype.destroy = function() { diff --git a/app/Game/Client/Networker.js b/app/Game/Client/Networker.js index f3ea014..985ae2b 100755 --- a/app/Game/Client/Networker.js +++ b/app/Game/Client/Networker.js @@ -180,7 +180,7 @@ function (ProtocolHelper, GameController, User, Nc, Settings, DomController) { }; Networker.prototype.onEndRound = function() { - this.gameController.toggleInfo(true); + this.gameController.toggleGameStats(true); }; return Networker; diff --git a/app/Game/Client/View/Abstract/Layer.js b/app/Game/Client/View/Abstract/Layer.js index 225c8ba..b9f33db 100644 --- a/app/Game/Client/View/Abstract/Layer.js +++ b/app/Game/Client/View/Abstract/Layer.js @@ -17,6 +17,8 @@ function (Abstract) { current: { x: 0, y: 0}, target: { x: 0, y: 0} }; + + this.ncTokens = []; } Object.defineProperty(Layer, 'ID', { @@ -49,5 +51,9 @@ function (Abstract) { this.zoom.target = z; }; + Layer.prototype.destroy = function() { + + }; + return Layer; }); \ No newline at end of file diff --git a/app/Game/Client/View/LayerManager.js b/app/Game/Client/View/LayerManager.js index e41f9d2..1aac491 100644 --- a/app/Game/Client/View/LayerManager.js +++ b/app/Game/Client/View/LayerManager.js @@ -161,6 +161,10 @@ function (Nc, Exception, Layer) { for (var i = 0; i < this.ncTokens.length; i++) { Nc.off(this.ncTokens[i]); }; + for (var i = this.layers.length - 1; i >= 0; i--) { + var layer = this.layers[i]; + layer.destroy(); + }; }; return LayerManager; diff --git a/app/Game/Client/View/Pixi/Layer.js b/app/Game/Client/View/Pixi/Layer.js index d8582bd..23c856f 100644 --- a/app/Game/Client/View/Pixi/Layer.js +++ b/app/Game/Client/View/Pixi/Layer.js @@ -179,14 +179,4 @@ function (Parent, PIXI, ColorRangeReplaceFilter, Settings) { }; return Layer; -}); - - -/* - -1 = this.zoom.current ? -1 - -1 = this.zoom.current * (-1) * (-1) - - -*/ +}); \ No newline at end of file diff --git a/app/Game/Client/View/Pixi/View.js b/app/Game/Client/View/Pixi/View.js index 2f4a08b..5dd2787 100755 --- a/app/Game/Client/View/Pixi/View.js +++ b/app/Game/Client/View/Pixi/View.js @@ -168,11 +168,8 @@ function (Parent, DomController, PIXI, Settings, Nc, Exception, GameStats, Layer PixiView.prototype.destroy = function() { - this.layerManager.destroy(); + this.layerManager.destroy(); // also calls all layers destroy - this.ghostLayer.destroy(); - this.swiperLayer.destroy(); - for (var i = 0; i < this.stage.children.length; i++) { this.stage.removeChild(this.stage.children[i]); }