Changed font from text

Input name can only be 4 characters long
Passing name to next scene
This commit is contained in:
David Négrier 2020-05-01 23:19:51 +02:00
parent 85f84517f6
commit 42ddd8b858
7 changed files with 141 additions and 28 deletions

View file

@ -1,7 +1,7 @@
export class TextField extends Phaser.GameObjects.Text {
export class TextField extends Phaser.GameObjects.BitmapText {
constructor(scene: Phaser.Scene, x: number, y: number, text: string | string[]) {
super(scene, x, y, text, { fontFamily: 'Arial', fontSize: "15px", color: '#ffffff'});
super(scene, x, y, 'main_font', text, 8);
this.scene.add.existing(this)
}
}