move with touch or right click

This commit is contained in:
Hanusiak Piotr 2022-02-02 16:38:43 +01:00
parent 272b43106b
commit a7b0516ac4

View File

@ -22,7 +22,7 @@ export class GameSceneUserInputHandler implements UserInputHandlerInterface {
}
public handlePointerUpEvent(pointer: Phaser.Input.Pointer, gameObjects: Phaser.GameObjects.GameObject[]): void {
if (pointer.rightButtonReleased() || pointer.getDuration() > 250) {
if (!pointer.wasTouch && pointer.leftButtonReleased() || pointer.getDuration() > 250) {
return;
}
for (const object of gameObjects) {