remove team check fixed scene swap
This commit is contained in:
@@ -104,10 +104,7 @@ class Combat extends Phaser.Scene {
|
||||
}
|
||||
// update log
|
||||
// shallow copy because reverse mutates
|
||||
const content = Array.from(game.log).reverse().join('\n');
|
||||
// this.log.setText(Array.from(game.log).reverse());
|
||||
console.log(this.log);
|
||||
this.log.setText(content);
|
||||
this.log.setText(Array.from(game.log).reverse());
|
||||
// has the phase changed?
|
||||
const phaseChange = (this.registry.get('gamePhase') === game.phase);
|
||||
if (phaseChange) return false;
|
||||
|
||||
@@ -11,8 +11,14 @@ class CrypList extends Phaser.Scene {
|
||||
}
|
||||
|
||||
create() {
|
||||
this.registry.events.off('changedata', this.updateData, this);
|
||||
this.registry.events.off('setdata', this.updateData, this);
|
||||
this.registry.events.on('changedata', this.updateData, this);
|
||||
this.registry.events.on('setdata', this.updateData, this);
|
||||
if (this.registry.get('cryps')) {
|
||||
this.renderList();
|
||||
this.renderGameList();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -60,7 +66,7 @@ class CrypList extends Phaser.Scene {
|
||||
if (cryp) {
|
||||
this.scene.add('StatSheet', StatSheet);
|
||||
this.scene.run('StatSheet', { cryp });
|
||||
this.scene.sleep();
|
||||
this.scene.stop();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -20,6 +20,8 @@ class StatSheet extends Phaser.Scene {
|
||||
this.cryp = cryp;
|
||||
this.stats = new Stats(this, cryp);
|
||||
this.addControls(cryp);
|
||||
this.addSkills(cryp);
|
||||
this.skills = true;
|
||||
}
|
||||
|
||||
addControls(cryp) {
|
||||
|
||||
Reference in New Issue
Block a user