Mini cleanup
This commit is contained in:
@ -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'
|
||||
|
Reference in New Issue
Block a user