diff --git a/src/components/sprites/Character.vue b/src/components/sprites/Character.vue index e65383f..6d4f9fd 100644 --- a/src/components/sprites/Character.vue +++ b/src/components/sprites/Character.vue @@ -93,13 +93,16 @@ const charTexture = computed(() => { const spriteId = props.character.characterType.sprite.id const action = props.character.isMoving ? 'walk' : 'idle' - if (rotation === 2 || rotation === 4) { + console.log('rotation', rotation) + if (rotation === 0 || rotation === 6) { + console.log(`${spriteId}-${action}_left_down`) return `${spriteId}-${action}_left_up` - } else if (rotation === 0 || rotation === 6) { + } else if (rotation === 2 || rotation === 4) { + console.log(`${spriteId}-${action}_right_down`) return `${spriteId}-${action}_right_down` } - return `${spriteId}-${action}_left_down` // Default fallback + return `${spriteId}-${action}_left_down` }) const createText = (text: Phaser.GameObjects.Text) => {