forked from noxious/client
stuffs
This commit is contained in:
@ -22,7 +22,7 @@ export const useGameStore = defineStore('game', {
|
||||
game: {
|
||||
isLoading: false,
|
||||
isLoaded: false, // isLoaded is currently being used to determine if the player has interacted with the game
|
||||
loadedAssets: [] as TextureData[],
|
||||
loadedAssets: [] as string[],
|
||||
isPlayerDraggingCamera: false,
|
||||
isCameraFollowingCharacter: false
|
||||
},
|
||||
@ -37,15 +37,9 @@ export const useGameStore = defineStore('game', {
|
||||
getLoadedAssets: (state) => {
|
||||
return state.game.loadedAssets
|
||||
},
|
||||
getLoadedAsset: (state) => {
|
||||
return (key: string | undefined) => {
|
||||
if (!key) return null
|
||||
return state.game.loadedAssets.find((asset) => asset.key === key)
|
||||
}
|
||||
isAssetLoaded: (state) => {
|
||||
return (key: string) => { return state.game.loadedAssets.includes(key)}
|
||||
},
|
||||
getLoadedAssetsByGroup: (state) => {
|
||||
return (group: string) => state.game.loadedAssets.filter((asset) => asset.group === group)
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
addNotification(notification: Notification) {
|
||||
|
Reference in New Issue
Block a user