basic login page with a text input and a click button
This commit is contained in:
parent
33bcbd4650
commit
d691b58d0b
9 changed files with 107 additions and 25 deletions
11
front/src/Phaser/Components/ClickButton.ts
Normal file
11
front/src/Phaser/Components/ClickButton.ts
Normal file
|
@ -0,0 +1,11 @@
|
|||
|
||||
export class ClickButton extends Phaser.GameObjects.Image{
|
||||
|
||||
constructor(scene: Phaser.Scene, x: number, y: number, textureName: string, callback: Function) {
|
||||
super(scene, x, y, textureName);
|
||||
this.scene.add.existing(this);
|
||||
this.setInteractive();
|
||||
this.on("pointerup", callback);
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue