Merge pull request #1815 from thecodingmachine/right-click-movement

move with touch or right click
This commit is contained in:
David Négrier 2022-02-02 18:34:36 +01:00 committed by GitHub
commit f1c999ffc1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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) {