PIXI Controls: Round hitArea for A/B/X/Y
This commit is contained in:
parent
85399acc67
commit
6eb3bed55a
2 changed files with 2 additions and 0 deletions
|
@ -61,6 +61,7 @@ ONSControls.createButtons = function() {
|
|||
.on("pointerup", (event) => {this.sendEvent(event, "BUTTON_Y")});
|
||||
for (btn of buttons) {
|
||||
btn.anchor.set(0.5);
|
||||
btn.hitArea = new PIXI.Circle(0, 0, 40);
|
||||
container.addChild(btn);
|
||||
}
|
||||
this._controlsCanvas.stage.addChild(container);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue