workadventure/front/src/Phaser/Components/TextField.ts

7 lines
284 B
TypeScript
Raw Normal View History

export class TextField extends Phaser.GameObjects.Text {
constructor(scene: Phaser.Scene, x: number, y: number, text: string | string[]) {
super(scene, x, y, text, { fontSize: '32px', fontStyle: 'Courier', color: '#ffffff'});
this.scene.add.existing(this)
}
}