const Phaser = require('phaser'); const { POSITIONS: { MENU_MAIN }, TEXT } = require('./constants'); const X = MENU_MAIN.x(); const Y = MENU_MAIN.y(); const WIDTH = MENU_MAIN.width(); const HEIGHT = MENU_MAIN.height(); class ItemInfo extends Phaser.Scene { constructor() { super({ key: 'ItemInfo' }); } create(item) { this.cameras.main.setViewport(X, Y, WIDTH, HEIGHT); // this.item = item; this.add.text(WIDTH / 10, 0, item, TEXT.HEADER); this.add.text(WIDTH / 10, 50, 'descriptions go here', TEXT.NORMAL); // this.addItemInfo(item); } cleanUp() { this.scene.remove(); } } module.exports = ItemInfo;