HumanBreak/src/core/loader/load.ts
2023-06-14 19:20:24 +08:00

16 lines
423 B
TypeScript

import resource from '../../data/resource.json';
import { Resource, getTypeByResource } from './resource';
const info = resource;
export function readyAllResource() {
info.forEach(v => {
const type = getTypeByResource(v);
if (type === 'zip') {
ancTe.zipResource.set(v, new Resource(v, 'zip'));
} else {
ancTe.resource.set(v, new Resource(v, type));
}
});
}