ran pretty on the front

This commit is contained in:
kharhamel
2021-09-06 14:27:54 +02:00
parent 7743bda3eb
commit 4160235b92
54 changed files with 808 additions and 694 deletions
+2 -5
View File
@@ -1,11 +1,8 @@
export class ClickButton extends Phaser.GameObjects.Image{
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);
}
}
}