function create() {
// …
const buttonEnclave = this.add.button(
10,
10,
"logo-enclave",
this.clickEnclave,
this,
);
// …
}Implementing game control mechanisms / notebook
Implementing game control mechanisms
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
function update() {
// …
if (this.game.input.mousePointer.isDown) {
// do something
}
// …
}