refactor menu

This commit is contained in:
Mashy
2018-12-21 19:31:59 +10:00
parent 114a6d505c
commit 58641b57f3
10 changed files with 390 additions and 209 deletions
+4 -3
View File
@@ -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();