bruhmoment

This commit is contained in:
2024-09-20 16:49:47 +02:00
parent be4c201d81
commit f3b56ef5fa
3 changed files with 17 additions and 5 deletions

View File

@ -24,12 +24,20 @@
</template>
<script setup lang="ts">
import { computed, onBeforeMount, onUnmounted, ref, watch } from 'vue'
import { computed, onBeforeMount, onMounted, onUnmounted, ref, watch } from 'vue'
import { Container, Image, useScene } from 'phavuer'
import { storeToRefs } from 'pinia'
import { useGameStore } from '@/stores/game'
import { useZoneEditorStore } from '@/stores/zoneEditor'
import { calculateIsometricDepth, placeTile, setAllTiles, sortByIsometricDepth, tileToWorldX, tileToWorldY } from '@/composables/zoneComposable'
import {
calculateIsometricDepth,
loadAssets,
placeTile,
setAllTiles,
sortByIsometricDepth,
tileToWorldX,
tileToWorldY
} from '@/composables/zoneComposable'
import { ZoneEventTileType, type ZoneObject, type ZoneEventTile, type Zone } from '@/types'
import { uuidv4 } from '@/utilities'
import config from '@/config'
@ -312,4 +320,9 @@ const setSelectedZoneObject = (zoneObject: ZoneObject | null) => {
if (zoneEditorStore.tool !== 'move') return
zoneEditorStore.setSelectedZoneObject(zoneObject)
}
onBeforeMount(async () => {
await gameStore.fetchAllZoneAssets()
await loadAssets(scene)
});
</script>