mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
fixed #91 crash after round end
This commit is contained in:
parent
b92cce88f2
commit
4f3a53ca53
6 changed files with 15 additions and 18 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
});
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -180,13 +180,3 @@ function (Parent, PIXI, ColorRangeReplaceFilter, Settings) {
|
|||
|
||||
return Layer;
|
||||
});
|
||||
|
||||
|
||||
/*
|
||||
|
||||
1 = this.zoom.current ? -1
|
||||
|
||||
1 = this.zoom.current * (-1) * (-1)
|
||||
|
||||
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -168,10 +168,7 @@ function (Parent, DomController, PIXI, Settings, Nc, Exception, GameStats, Layer
|
|||
|
||||
PixiView.prototype.destroy = function() {
|
||||
|
||||
this.layerManager.destroy();
|
||||
|
||||
this.ghostLayer.destroy();
|
||||
this.swiperLayer.destroy();
|
||||
this.layerManager.destroy(); // also calls all layers destroy
|
||||
|
||||
for (var i = 0; i < this.stage.children.length; i++) {
|
||||
this.stage.removeChild(this.stage.children[i]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue