forked from noxious/client
Improved map tile initialising
This commit is contained in:
@ -90,7 +90,9 @@ const updatePosition = (positionX: number, positionY: number, direction: Directi
|
||||
}
|
||||
},
|
||||
onUpdate: (tween) => {
|
||||
// @ts-ignore
|
||||
currentPositionX.value = tween.targets[0].x
|
||||
// @ts-ignore
|
||||
currentPositionY.value = tween.targets[0].y
|
||||
},
|
||||
onComplete: () => {
|
||||
@ -149,8 +151,6 @@ watch(
|
||||
}
|
||||
)
|
||||
|
||||
watch(() => props.mapCharacter, updateSprite)
|
||||
|
||||
const characterTypeStorage = new CharacterTypeStorage()
|
||||
characterTypeStorage.getSpriteId(props.mapCharacter.character.characterType!).then((spriteId) => {
|
||||
console.log(spriteId)
|
||||
@ -172,8 +172,7 @@ onMounted(() => {
|
||||
mapStore.setCharacterLoaded(true)
|
||||
|
||||
// #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.startFollow(charContainer.value as Phaser.GameObjects.Container)
|
||||
}
|
||||
|
||||
updatePosition(props.mapCharacter.character.positionX, props.mapCharacter.character.positionY, props.mapCharacter.character.rotation)
|
||||
|
Reference in New Issue
Block a user