This commit is contained in:
2025-01-12 20:54:59 +01:00
parent 689e443b3d
commit 3f8c911e9d
6 changed files with 23 additions and 64 deletions

View File

@ -24,7 +24,6 @@ import Effects from '@/components/Effects.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'
import Clock from '@/components/gui/Clock.vue'
import ExpBar from '@/components/gui/ExpBar.vue'
import Hotkeys from '@/components/gui/Hotkeys.vue'
@ -42,22 +41,11 @@ const gameConfig = {
width: window.innerWidth,
height: window.innerHeight,
type: Phaser.AUTO, // AUTO, CANVAS, WEBGL, HEADLESS
resolution: 5,
plugins: {
global: [
{
key: 'rexAwaitLoader',
plugin: AwaitLoaderPlugin,
start: true
}
]
}
resolution: 5
}
const createGame = (game: Phaser.Game) => {
/**
* Resize the game when the window is resized
*/
// Resize the game when the window is resized
addEventListener('resize', () => {
game.scale.resize(window.innerWidth, window.innerHeight)
})
@ -73,9 +61,7 @@ const createGame = (game: Phaser.Game) => {
}
function preloadScene(scene: Phaser.Scene) {
/**
* Load the base assets into the Phaser scene
*/
// Load the base assets into the Phaser scene
scene.load.image('blank_tile', '/assets/map/blank_tile.png')
scene.load.image('waypoint', '/assets/waypoint.png')
}