Showing placed map object works in both game and map editor, updated types, cleaned some logic

This commit is contained in:
2025-02-05 02:27:18 +01:00
parent 027fdd7dac
commit d2b6d8dcb3
12 changed files with 134 additions and 112 deletions

View File

@ -1,7 +1,7 @@
<template>
<div class="flex justify-center items-center h-dvh relative">
<Game :config="gameConfig" @create="createGame">
<Scene name="main" @preload="preloadScene" @create="createScene">
<Scene name="main" @preload="preloadScene">
<Menu />
<Hud />
<Hotkeys />
@ -29,7 +29,6 @@ import Menu from '@/components/game/gui/Menu.vue'
import Map from '@/components/game/map/Map.vue'
import { useGameStore } from '@/stores/gameStore'
import { Game, Scene } from 'phavuer'
import { onBeforeUnmount } from 'vue'
const gameStore = useGameStore()
@ -62,8 +61,4 @@ function preloadScene(scene: Phaser.Scene) {
scene.load.image('blank_tile', '/assets/map/blank_tile.png')
scene.load.image('waypoint', '/assets/waypoint.png')
}
function createScene(scene: Phaser.Scene) {}
onBeforeUnmount(() => {})
</script>