const Phaser = require('phaser'); const { POSITIONS: { NAVIGATION }, TEXT } = require('./constants'); const X = NAVIGATION.x(); const Y = NAVIGATION.y(); const HEIGHT = NAVIGATION.height(); class MenuScore extends Phaser.Scene { constructor() { super({ key: 'MenuScore' }); } create() { const { score } = this.registry.get('player'); this.add.text(X, Y, `Wins: ${score.wins}`, TEXT.HEADER); this.add.text(X, Y + HEIGHT * 0.1, `Losses: ${score.losses}`, TEXT.HEADER); } cleanUp() { this.scene.remove(); } } module.exports = MenuScore;