idk
This commit is contained in:
@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<Container v-if="props.character" :x="currentX" :y="currentY">
|
||||
<!-- Start chat bubble -->
|
||||
<!-- <RoundRectangle :origin-x="0.5" :origin-y="7.5" :fillColor="0xffffff" :width="194" :height="21" :radius="5" />-->
|
||||
<!-- <Text @create="createText" :text="`This is a chat message 🤯👋`" :origin-x="0.5" :origin-y="10.9" :style="{ fontSize: 13, fontFamily: 'Arial', color: '#000' }" />-->
|
||||
<!-- End chat bubble -->
|
||||
<!-- Start chat bubble -->
|
||||
<!-- <RoundRectangle :origin-x="0.5" :origin-y="7.5" :fillColor="0xffffff" :width="194" :height="21" :radius="5" />-->
|
||||
<!-- <Text @create="createText" :text="`This is a chat message 🤯👋`" :origin-x="0.5" :origin-y="10.9" :style="{ fontSize: 13, fontFamily: 'Arial', color: '#000' }" />-->
|
||||
<!-- End chat bubble -->
|
||||
<Text @create="createText" :text="props.character.name" :origin-x="0.5" :origin-y="9" />
|
||||
<RoundRectangle :origin-x="0.5" :origin-y="18.5" :fillColor="0xffffff" :width="74" :height="6" :radius="5" />
|
||||
<RoundRectangle :origin-x="0.5" :origin-y="36.4" :fillColor="0x00b3b3" :width="70" :height="3" :radius="5" />
|
||||
@ -67,8 +67,8 @@ watch(
|
||||
() => props.character,
|
||||
(newChar, oldChar) => {
|
||||
if (newChar) {
|
||||
if (!oldChar || newChar.position_x !== oldChar.position_x || newChar.position_y !== oldChar.position_y) {
|
||||
updatePosition(newChar.position_x, newChar.position_y)
|
||||
if (!oldChar || newChar.positionX !== oldChar.positionX || newChar.positionY !== oldChar.positionY) {
|
||||
updatePosition(newChar.positionX, newChar.positionY)
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -100,7 +100,7 @@ const createText = (text: Phaser.GameObjects.Text) => {
|
||||
|
||||
onMounted(() => {
|
||||
if (props.character) {
|
||||
updatePosition(props.character.position_x, props.character.position_y)
|
||||
updatePosition(props.character.positionX, props.character.positionY)
|
||||
}
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user