forked from noxious/client
stuffs
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
<ChatBubble :mapCharacter="props.mapCharacter" :currentX="currentX" :currentY="currentY" />
|
||||
<Healthbar :mapCharacter="props.mapCharacter" :currentX="currentX" :currentY="currentY" />
|
||||
<Container ref="charContainer" :depth="isometricDepth" :x="currentX" :y="currentY">
|
||||
<CharacterHair :mapCharacter="props.mapCharacter" :currentX="currentX" :currentY="currentY" />
|
||||
<!-- <CharacterHair :mapCharacter="props.mapCharacter" :currentX="currentX" :currentY="currentY" />-->
|
||||
<!-- <CharacterChest :mapCharacter="props.mapCharacter" :currentX="currentX" :currentY="currentY" />-->
|
||||
<Sprite ref="charSprite" :origin-y="1" :flipX="isFlippedX" />
|
||||
</Container>
|
||||
@ -109,7 +109,7 @@ const isFlippedX = computed(() => [6, 4].includes(props.mapCharacter.character.r
|
||||
|
||||
const charTexture = computed(() => {
|
||||
const { rotation, characterType } = props.mapCharacter.character
|
||||
const spriteId = characterType?.sprite ?? 'idle_right_down'
|
||||
const spriteId = characterType ?? 'idle_right_down'
|
||||
const action = props.mapCharacter.isMoving ? 'walk' : 'idle'
|
||||
const direction = [0, 6].includes(rotation) ? 'left_up' : 'right_down'
|
||||
|
||||
@ -152,7 +152,7 @@ watch(
|
||||
|
||||
watch(() => props.mapCharacter, updateSprite)
|
||||
|
||||
loadSpriteTextures(scene, props.mapCharacter.character.characterType?.sprite as string)
|
||||
loadSpriteTextures(scene, props.mapCharacter.character.characterType as string)
|
||||
.then(() => {
|
||||
charSprite.value!.setTexture(charTexture.value)
|
||||
charSprite.value!.setFlipX(isFlippedX.value)
|
||||
|
Reference in New Issue
Block a user