forked from noxious/client
Renamed zone > map
This commit is contained in:
@ -126,7 +126,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import config from '@/application/config'
|
||||
import { type CharacterHair, type Character as CharacterT, type Zone } from '@/application/types'
|
||||
import { type CharacterHair, type Character as CharacterT, type Map } from '@/application/types'
|
||||
import Modal from '@/components/utilities/Modal.vue'
|
||||
import { useGameStore } from '@/stores/gameStore'
|
||||
import { onBeforeUnmount, ref, watch } from 'vue'
|
||||
@ -166,7 +166,7 @@ function loginWithCharacter() {
|
||||
characterId: selectedCharacterId.value,
|
||||
characterHairId: selectedHairId.value
|
||||
},
|
||||
(response: { character: CharacterT; zone: Zone; characters: CharacterT[] }) => {
|
||||
(response: { character: CharacterT; map: Map; characters: CharacterT[] }) => {
|
||||
gameStore.setCharacter(response.character)
|
||||
}
|
||||
)
|
||||
|
@ -6,7 +6,7 @@
|
||||
<Hud />
|
||||
<Hotkeys />
|
||||
<Clock />
|
||||
<Zone />
|
||||
<Map />
|
||||
<Chat />
|
||||
<ExpBar />
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
import config from '@/application/config'
|
||||
import 'phaser'
|
||||
import Effects from '@/components/Effects.vue'
|
||||
import Zone from '@/components/game/zone/Zone.vue'
|
||||
import Map from '@/components/game/map/Map.vue'
|
||||
import CharacterProfile from '@/components/gui/CharacterProfile.vue'
|
||||
import Chat from '@/components/gui/Chat.vue'
|
||||
// import Minimap from '@/components/gui/Minimap.vue'
|
||||
@ -75,7 +75,7 @@ function preloadScene(scene: Phaser.Scene) {
|
||||
/**
|
||||
* Load the base assets into the Phaser scene
|
||||
*/
|
||||
scene.load.image('blank_tile', '/assets/zone/blank_tile.png')
|
||||
scene.load.image('blank_tile', '/assets/map/blank_tile.png')
|
||||
scene.load.image('waypoint', '/assets/waypoint.png')
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div class="flex justify-center items-center h-dvh relative">
|
||||
<Game :config="gameConfig" @create="createGame">
|
||||
<Scene name="main" @preload="preloadScene" @create="createScene">
|
||||
<ZoneEditor :key="JSON.stringify(`${zoneEditorStore.zone?.id}_${zoneEditorStore.zone?.createdAt}_${zoneEditorStore.zone?.updatedAt ?? ''}`)" />
|
||||
<MapEditor :key="JSON.stringify(`${mapEditorStore.map?.id}_${mapEditorStore.map?.createdAt}_${mapEditorStore.map?.updatedAt ?? ''}`)" />
|
||||
</Scene>
|
||||
</Game>
|
||||
</div>
|
||||
@ -12,15 +12,15 @@
|
||||
import config from '@/application/config'
|
||||
import 'phaser'
|
||||
import type { AssetDataT } from '@/application/types'
|
||||
import ZoneEditor from '@/components/gameMaster/zoneEditor/ZoneEditor.vue'
|
||||
import MapEditor from '@/components/gameMaster/mapEditor/MapEditor.vue'
|
||||
import { loadTexture } from '@/composables/gameComposable'
|
||||
import { useGameStore } from '@/stores/gameStore'
|
||||
import { useZoneEditorStore } from '@/stores/zoneEditorStore'
|
||||
import { useMapEditorStore } from '@/stores/mapEditorStore'
|
||||
import AwaitLoaderPlugin from 'phaser3-rex-plugins/plugins/awaitloader-plugin'
|
||||
import { Game, Scene } from 'phavuer'
|
||||
|
||||
const gameStore = useGameStore()
|
||||
const zoneEditorStore = useZoneEditorStore()
|
||||
const mapEditorStore = useMapEditorStore()
|
||||
|
||||
const gameConfig = {
|
||||
name: config.name,
|
||||
@ -61,9 +61,9 @@ const preloadScene = async (scene: Phaser.Scene) => {
|
||||
/**
|
||||
* Load the base assets into the Phaser scene
|
||||
*/
|
||||
scene.load.image('BLOCK', '/assets/zone/bt_tile.png')
|
||||
scene.load.image('TELEPORT', '/assets/zone/tp_tile.png')
|
||||
scene.load.image('blank_tile', '/assets/zone/blank_tile.png')
|
||||
scene.load.image('BLOCK', '/assets/map/bt_tile.png')
|
||||
scene.load.image('TELEPORT', '/assets/map/tp_tile.png')
|
||||
scene.load.image('blank_tile', '/assets/map/blank_tile.png')
|
||||
scene.load.image('waypoint', '/assets/waypoint.png')
|
||||
|
||||
/**
|
Reference in New Issue
Block a user