Send new location as array instead of object
This commit is contained in:
parent
d819a84a37
commit
ad611ef593
@ -42,10 +42,7 @@ export function useGameControlsComposable(scene: Phaser.Scene, layer: Phaser.Til
|
||||
function emitMovement(x: number, y: number) {
|
||||
if (x === currentPosition.x && y === currentPosition.y) return
|
||||
|
||||
gameStore.connection?.emit(SocketEvent.MAP_CHARACTER_MOVE, {
|
||||
positionX: x,
|
||||
positionY: y
|
||||
})
|
||||
gameStore.connection?.emit(SocketEvent.MAP_CHARACTER_MOVE, [x, y])
|
||||
|
||||
currentPosition = { x, y }
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user