More finetuning of hair positioning
This commit is contained in:
@ -155,7 +155,7 @@ onMounted(() => {
|
||||
|
||||
// #146 : Set camera position to character, need to be improved still
|
||||
scene.cameras.main.startFollow(charContainer.value as Phaser.GameObjects.Container)
|
||||
scene.cameras.main.stopFollow()
|
||||
// scene.cameras.main.stopFollow()
|
||||
}
|
||||
|
||||
updatePosition(props.zoneCharacter.character.positionX, props.zoneCharacter.character.positionY, props.zoneCharacter.character.rotation)
|
||||
|
@ -29,10 +29,8 @@ const texture = computed(() => {
|
||||
const isFlippedX = computed(() => [6, 4].includes(props.zoneCharacter.character.rotation ?? 0))
|
||||
const imageProps = computed(() => ({
|
||||
depth: 1,
|
||||
originY: [0, 6].includes(props.zoneCharacter.character.rotation ?? 0) ? 4.35 : 5.35,
|
||||
originY: [0, 6].includes(props.zoneCharacter.character.rotation ?? 0) ? 4.30 : 5.25,
|
||||
flipX: isFlippedX.value,
|
||||
y: props.zoneCharacter.isMoving ? (scene.time.now % 500 < 250 ? 0 : 2) : 2, // Add this line
|
||||
x: props.zoneCharacter.isMoving ? (scene.time.now % 500 < 250 ? 0 : -2) : -1, // Add this line
|
||||
texture: texture.value
|
||||
}))
|
||||
|
||||
|
@ -82,7 +82,7 @@ export async function loadSpriteTextures(scene: Phaser.Scene, sprite: Sprite) {
|
||||
scene.textures.addSpriteSheet(sprite_action.key, anim, { frameWidth: sprite_action.frameWidth ?? 0, frameHeight: sprite_action.frameHeight ?? 0 })
|
||||
scene.anims.create({
|
||||
key: sprite_action.key,
|
||||
frameRate: 6.3, // TODO | 262 : Allow configuring frame rate
|
||||
frameRate: 7, // TODO | 262 : Allow configuring frame rate
|
||||
frames: scene.anims.generateFrameNumbers(sprite_action.key, { start: 0, end: sprite_action.frameCount! - 1 }),
|
||||
repeat: -1
|
||||
})
|
||||
|
Reference in New Issue
Block a user