Fully finished zone loading logic

This commit is contained in:
2024-07-07 15:42:54 +02:00
parent ead0da0a5e
commit 16d830df66
2 changed files with 65 additions and 141 deletions

View File

@ -19,7 +19,7 @@
</Game>
<Game :config="gameConfig" @create="createGame" v-if="zoneEditorStore.active">
<Scene name="main" @preload="preloadScene" @create="createScene">
<ZoneEditor v-if="isLoaded" />
<ZoneEditor v-if="isLoaded" :key="zoneEditorStore.zone?.id ?? 0" />
</Scene>
</Game>
</div>
@ -160,4 +160,8 @@ const createScene = (scene: Phaser.Scene) => {
})
})
}
// watch(() => zoneEditorStore.zone, () => {
// isLoaded.value = false
// }, {deep:true});
</script>