forked from noxious/client
Worked on creating new characters
This commit is contained in:
@ -44,7 +44,7 @@ function onPointerClick(pointer: Phaser.Input.Pointer) {
|
||||
position.x = worldPoint.x + config.tile_size.y;
|
||||
position.y = worldPoint.y;
|
||||
|
||||
socket.connection?.emit('move', { x: position.x, y: position.y });
|
||||
socket.getConnection.emit('move', { x: position.x, y: position.y });
|
||||
}
|
||||
|
||||
//Directions for player sprites + animations
|
||||
@ -57,14 +57,13 @@ function onPointerClick(pointer: Phaser.Input.Pointer) {
|
||||
} else if (px > 0 && py < 0) {
|
||||
console.log('top right');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (!props.player) {
|
||||
scene.input.on(Phaser.Input.Events.POINTER_UP, onPointerClick);
|
||||
}
|
||||
|
||||
socket.connection?.on('player_moved', (data) => {
|
||||
socket.getConnection.on('player_moved', (data: any) => {
|
||||
console.log('player_moved', data);
|
||||
|
||||
if (data.id !== props.player?.id) {
|
||||
|
Reference in New Issue
Block a user