Hey There,
trying to figure out how to detect right click. any help would be greatly appreciated. i have an object function running this:
this.setInteractive({useHandCursor: true })
.on('pointerover', () =>
{
debugtext.x = Math.ceil(game.input.mousePointer.x/64)*64;
debugtext.y = Math.ceil(game.input.mousePointer.y/64)*64-64;
if (this.mined < 8) {
debugtext.setText(`id: ${this.tID} \nin: ${this.mined}`);
}
else{
debugtext.setText(`id: ${this.tID} \nin: full`);
}
})
.on('pointerdown', () =>
{
if (this.mined < 8) {
this.mined++;
console.log("ID: ", this.tID, "mined: ",this.mined);
debugtext.setText(`id: ${this.tID} \nin: ${this.mined}`);
}
else{
debugtext.setText(`id: ${this.tID} \nin: full`);
}
})
.on('rightButtondown',() =>
{
console.log('rightclick');
});