Chud
0
Q:

phaser3 button not working

create () {
    this.startBtn = this.add.sprite(100, 100, 'startBtn').setInteractive();

    this.startBtn.on('pointerover', function (event) { /* Do something when the mouse enters */ });
    this.startBtn.on('pointerout', function (event) { /* Do something when the mouse exits. */ });
    this.startBtn.on('pointerdown', startGame); // Start game on click.
}
0

Tags

New to Communities?

Join the community