1
0
forked from noxious/client

Renamed class

This commit is contained in:
Dennis Postma 2024-12-31 16:15:28 +01:00
parent 5fcb336835
commit 8355c83dc8
3 changed files with 6 additions and 6 deletions

6
package-lock.json generated
View File

@ -7975,9 +7975,9 @@
"license": "ISC" "license": "ISC"
}, },
"node_modules/yaml": { "node_modules/yaml": {
"version": "2.6.1", "version": "2.7.0",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.6.1.tgz", "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.0.tgz",
"integrity": "sha512-7r0XPzioN/Q9kXBro/XPnA6kznR73DHq+GXh5ON7ZozRO6aMjbmiBuKste2wslTFkC5d1dw0GooOCepZXJ2SAg==", "integrity": "sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA==",
"dev": true, "dev": true,
"license": "ISC", "license": "ISC",
"bin": { "bin": {

View File

@ -2,7 +2,7 @@ import config from '@/application/config'
import Dexie from 'dexie' import Dexie from 'dexie'
import type { AssetDataT } from '@/application/types' import type { AssetDataT } from '@/application/types'
export class AssetStorage { export class Assets {
private db: Dexie private db: Dexie
constructor() { constructor() {

View File

@ -1,13 +1,13 @@
import type { AssetDataT, HttpResponse, Sprite, SpriteAction } from '@/application/types' import type { AssetDataT, HttpResponse, Sprite, SpriteAction } from '@/application/types'
import { useGameStore } from '@/stores/gameStore' import { useGameStore } from '@/stores/gameStore'
import { AssetStorage } from '@/application/assetStorage' import { Assets } from '@/application/assets'
import config from '@/application/config' import config from '@/application/config'
const textureLoadingPromises = new Map<string, Promise<boolean>>() const textureLoadingPromises = new Map<string, Promise<boolean>>()
export async function loadTexture(scene: Phaser.Scene, assetData: AssetDataT): Promise<boolean> { export async function loadTexture(scene: Phaser.Scene, assetData: AssetDataT): Promise<boolean> {
const gameStore = useGameStore() const gameStore = useGameStore()
const assetStorage = new AssetStorage() const assetStorage = new Assets()
// Check if the texture is already loaded in Phaser // Check if the texture is already loaded in Phaser
if (gameStore.game.loadedAssets.find((asset) => asset.key === assetData.key)) { if (gameStore.game.loadedAssets.find((asset) => asset.key === assetData.key)) {