Mini cleanup

This commit is contained in:
2025-02-19 01:07:27 +01:00
parent 0e3a0e3dba
commit 2281c2c5e0
3 changed files with 5 additions and 13 deletions

View File

@ -103,14 +103,10 @@ export function useCharacterSpriteComposable(scene: Phaser.Scene, tilemap: Phase
let actionWithDirection = `${currentAction.value}_${currentDirection.value}`
if (action) actionWithDirection = action
return sprite?.spriteActions?.find(
(spriteAction: SpriteAction) => spriteAction.action === actionWithDirection
)?.frameHeight ?? 0
return sprite?.spriteActions?.find((spriteAction: SpriteAction) => spriteAction.action === actionWithDirection)?.frameHeight ?? 0
}
const spriteHeight = computed(() =>
getSpriteHeightByAction(currentAction.value)
)
const spriteHeight = computed(() => getSpriteHeightByAction(currentAction.value))
const currentAction = computed(() => {
return mapCharacter.isMoving ? 'walk' : 'idle'