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 {
if (pointer.rightButtonReleased()) {
return;
}
const camera = this.gameScene.getCameraManager().getCamera();
const index = this.gameScene
.getGameMap()

View File

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