disable context menu. Move player only on left-click

This commit is contained in:
Hanusiak Piotr 2022-01-18 11:18:52 +01:00
parent 391fe7eed3
commit 67cd0dfb29
2 changed files with 4 additions and 0 deletions

View File

@ -19,6 +19,9 @@ export class GameSceneUserInputHandler implements UserInputHandlerInterface {
} }
public handlePointerUpEvent(pointer: Phaser.Input.Pointer, gameObjects: Phaser.GameObjects.GameObject[]): void { public handlePointerUpEvent(pointer: Phaser.Input.Pointer, gameObjects: Phaser.GameObjects.GameObject[]): void {
if (pointer.rightButtonReleased()) {
return;
}
const camera = this.gameScene.getCameraManager().getCamera(); const camera = this.gameScene.getCameraManager().getCamera();
const index = this.gameScene const index = this.gameScene
.getGameMap() .getGameMap()

View File

@ -102,6 +102,7 @@ const config: GameConfig = {
dom: { dom: {
createContainer: true, createContainer: true,
}, },
disableContextMenu: true,
render: { render: {
pixelArt: true, pixelArt: true,
roundPixels: true, roundPixels: true,