diff --git a/client/src/scenes/cryp.list.js b/client/src/scenes/cryp.list.js index 97869dda..e48124e8 100644 --- a/client/src/scenes/cryp.list.js +++ b/client/src/scenes/cryp.list.js @@ -9,16 +9,14 @@ class CrypList extends Phaser.Scene { create() { this.registry.events.on('changedata', this.updateData, this); - - const cryps = this.registry.get('cryps'); this.graphics = this.add.graphics(); - this.renderCryps(cryps); + return true; } updateData(parent, key, data) { if (key === 'cryps') { - return this.scene.restart(); + this.renderCryps(data); } return true; } @@ -32,14 +30,14 @@ class CrypList extends Phaser.Scene { this.destroyText(); this.graphics.clear(); - const crypRows = cryps.forEach((cryp, i) => { + cryps.forEach((cryp, i) => { crypRow(this, cryp, i); }); this.input.on('gameobjectup', this.clickHandler, this); // seal the boxes in and stop rerendering them - // this.graphics.generateTexture(); + this.graphics.generateTexture(); return true; }