phaser 3 text box code example
Example: phaser 3 text
let text;
let player;
create () {
player = this.add.sprite(0,0,'player');
const style = { font: "bold 32px Arial", fill: "#fff" };
text = this.add.text(0, 0, `Player Coords: ${player.x} ${player.y}`, style);
}
update () {
text.setText(
`Player Coords: ${player.x} ${player.y}`;
);
}