You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
728 B

class Boot extends ManageLang {
constructor(father) {
super('Boot', father);
}
create() {
super.create();
let style = {font: '200px stencil', fill: "#e2e2e2"};
this.add.text(WIDTH_WINDOW / 2, HEIGHT_WINDOW / 3, "WARIA", style).setOrigin(0.5, 0.5);
let btn = this.add.sprite(WIDTH_WINDOW / 2, (HEIGHT_WINDOW / 3) * 2, 'playLetter').setInteractive();
btn.on('pointerout', () => btn.setFrame(0));
btn.on('pointerover', () => btn.setFrame(1));
btn.on('pointerdown', () => this.clickPlay(btn));
}
clickPlay(btn) {
console.log("Play");
this.father.scene.add('Type', new Type(this.father));
this.scene.start('Type');
}
}