do not move player if clicked on Player or RemotePlayer. Close actionsMenu on second click
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
import { Player } from '../Player/Player';
|
||||
import { RemotePlayer } from '../Entity/RemotePlayer';
|
||||
|
||||
import type { UserInputHandlerInterface } from "../../Interfaces/UserInputHandlerInterface";
|
||||
import type { GameScene } from "../Game/GameScene";
|
||||
|
||||
@@ -22,6 +25,12 @@ export class GameSceneUserInputHandler implements UserInputHandlerInterface {
|
||||
if (pointer.rightButtonReleased() || pointer.getDuration() > 250) {
|
||||
return;
|
||||
}
|
||||
for (const object of gameObjects) {
|
||||
if (object instanceof Player || object instanceof RemotePlayer) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
console.log(gameObjects);
|
||||
const camera = this.gameScene.getCameraManager().getCamera();
|
||||
const index = this.gameScene
|
||||
.getGameMap()
|
||||
|
||||
Reference in New Issue
Block a user