1
0
forked from noxious/client

Renamed class

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

View File

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

View File

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