Fixed anim
This commit is contained in:
parent
90b722b07c
commit
ecaf7f1de0
@ -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) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user