refactor menu
This commit is contained in:
@@ -15,8 +15,8 @@ class StatSheet extends Phaser.Scene {
|
||||
super({ key: 'StatSheet' });
|
||||
}
|
||||
|
||||
create(props) {
|
||||
const { cryp } = props;
|
||||
create(cryp) {
|
||||
console.log(cryp);
|
||||
this.cryp = cryp;
|
||||
this.stats = new Stats(this, cryp);
|
||||
this.addControls(cryp);
|
||||
@@ -27,7 +27,8 @@ class StatSheet extends Phaser.Scene {
|
||||
addControls(cryp) {
|
||||
const menuCback = () => {
|
||||
this.registry.events.off('changedata', this.updateData, this);
|
||||
this.scene.run('CrypList');
|
||||
this.registry.set('game', null);
|
||||
this.scene.switch('Menu'); // Switch back to menu
|
||||
this.scene.remove('Skills');
|
||||
this.scene.remove('Passives');
|
||||
this.scene.remove();
|
||||
|
||||
Reference in New Issue
Block a user