From d7cc8ba8fd2b43e1953d0d22d28b27e5a7452d00 Mon Sep 17 00:00:00 2001 From: Dennis Postma Date: Sat, 15 Jun 2024 22:37:10 +0200 Subject: [PATCH] clean --- src/components/sprites/Character.vue | 10 +++++----- src/services/zone.ts | 11 +++++------ 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/components/sprites/Character.vue b/src/components/sprites/Character.vue index 07555d2..e59d3b0 100644 --- a/src/components/sprites/Character.vue +++ b/src/components/sprites/Character.vue @@ -1,13 +1,13 @@ diff --git a/src/services/zone.ts b/src/services/zone.ts index f4e4058..b62794f 100644 --- a/src/services/zone.ts +++ b/src/services/zone.ts @@ -6,14 +6,13 @@ export function getTile(x: number, y: number, layer: Phaser.Tilemaps.TilemapLaye return tile } -export function tileToWorldX(layer: Phaser.Tilemaps.TilemapLayer, pos_x: number, pos_y: number) { - const worldPoint = layer.tileToWorldXY(pos_x, pos_y) - return worldPoint.x + config.tile_size.y +export function tileToWorldX(layer: Phaser.Tilemaps.TilemapLayer, pos_x: number) { + const worldPoint = layer.tileToWorldX(pos_x) + return worldPoint + config.tile_size.y } -export function tileToWorldY(layer: Phaser.Tilemaps.TilemapLayer, pos_x: number, pos_y: number) { - const worldPoint = layer.tileToWorldXY(pos_x, pos_y) - return worldPoint.y +export function tileToWorldY(layer: Phaser.Tilemaps.TilemapLayer, pos_y: number) { + return layer.tileToWorldY(pos_y) } export function tileToWorldXY(layer: Phaser.Tilemaps.TilemapLayer, pos_x: number, pos_y: number) {