cleanup combat skills
This commit is contained in:
parent
65bbd82d0e
commit
31883afa43
@ -61,8 +61,7 @@ class Combat extends Phaser.Scene {
|
|||||||
this.registry.set('game', null);
|
this.registry.set('game', null);
|
||||||
this.scene.get('CombatLog').cleanUp();
|
this.scene.get('CombatLog').cleanUp();
|
||||||
this.scene.get('CombatCryps').cleanUp();
|
this.scene.get('CombatCryps').cleanUp();
|
||||||
|
this.scene.get('CombatSkills').cleanUp();
|
||||||
// this.scene.manager.remove('CombatSkills');
|
|
||||||
this.scene.remove();
|
this.scene.remove();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -241,6 +241,11 @@ class CombatSkills extends Phaser.Scene {
|
|||||||
CRYP_KEY_MAP.forEach(tKey => this.input.keyboard.removeListener(tKey));
|
CRYP_KEY_MAP.forEach(tKey => this.input.keyboard.removeListener(tKey));
|
||||||
SKILL_KEY_MAP.forEach(tKey => this.input.keyboard.removeListener(tKey));
|
SKILL_KEY_MAP.forEach(tKey => this.input.keyboard.removeListener(tKey));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cleanUp() {
|
||||||
|
this.registry.events.off('changedata', this.updateData);
|
||||||
|
this.scene.remove();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = CombatSkills;
|
module.exports = CombatSkills;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user