1
0
forked from noxious/client

Renamed property for better consistency

This commit is contained in:
Dennis Postma 2025-01-01 20:46:02 +01:00
parent 2abce7a7e7
commit f9bfbdf735
2 changed files with 5 additions and 5 deletions

View File

@ -30,7 +30,7 @@ enum Direction {
} }
const props = defineProps<{ const props = defineProps<{
layer: Phaser.Tilemaps.Tilemap tilemap: Phaser.Tilemaps.Tilemap
zoneCharacter: ZoneCharacter zoneCharacter: ZoneCharacter
}>() }>()
@ -52,8 +52,8 @@ const updateIsometricDepth = (x: number, y: number) => {
} }
const updatePosition = (x: number, y: number, direction: Direction) => { const updatePosition = (x: number, y: number, direction: Direction) => {
const targetX = tileToWorldX(props.layer, x, y) const targetX = tileToWorldX(props.tilemap, x, y)
const targetY = tileToWorldY(props.layer, x, y) const targetY = tileToWorldY(props.tilemap, x, y)
if (isInitialPosition.value) { if (isInitialPosition.value) {
currentX.value = targetX currentX.value = targetX
@ -76,7 +76,7 @@ const updatePosition = (x: number, y: number, direction: Direction) => {
const duration = distance * 5.7 const duration = distance * 5.7
tween.value = props.layer.scene.tweens.add({ tween.value = props.tilemap.scene.tweens.add({
targets: { x: currentX.value, y: currentY.value }, targets: { x: currentX.value, y: currentY.value },
x: targetX, x: targetX,
y: targetY, y: targetY,

View File

@ -1,5 +1,5 @@
<template> <template>
<Character v-for="item in zoneStore.characters" :key="item.character.id" :layer="tilemap" :zoneCharacter="item" /> <Character v-for="item in zoneStore.characters" :key="item.character.id" :tilemap="tilemap" :zoneCharacter="item" />
</template> </template>
<script setup lang="ts"> <script setup lang="ts">