no more scene restarts monkaS
This commit is contained in:
parent
d4bcaa244c
commit
7c74018dbf
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user