mirror of
https://github.com/unanmed/HumanBreak.git
synced 2026-11-19 14:34:31 +08:00
播放音效
This commit is contained in:
1 parent
069ee0613b
commit
bdaf37cb0c
7 files changed
+1335
-937
No files matched your search
+6
-18
@@ -1,27 +1,15 @@
|
||||
import resource from '../../data/resource.json';
|
||||
import { NonZipResource, Resource, getTypeByResource } from './resource';
|
||||
import { Resource, getTypeByResource } from './resource';
|
||||
|
||||
const info = resource as ResourceInfo[];
|
||||
|
||||
export interface ResourceInfo {
|
||||
includes: string[];
|
||||
zip: boolean;
|
||||
zippedName?: string;
|
||||
}
|
||||
const info = resource;
|
||||
|
||||
export function readyAllResource() {
|
||||
info.forEach(v => {
|
||||
if (v.zip) {
|
||||
const id = `zip.${v.zippedName}`;
|
||||
ancTe.zipResource.push([[id, new Resource(id, 'zip')]]);
|
||||
const type = getTypeByResource(v);
|
||||
if (type === 'zip') {
|
||||
ancTe.zipResource.set(v, new Resource(v, 'zip'));
|
||||
} else {
|
||||
const res: [string, Resource<NonZipResource>][] = v.includes.map(
|
||||
v => {
|
||||
const type = getTypeByResource(v);
|
||||
return [v, new Resource(v, type as NonZipResource)];
|
||||
}
|
||||
);
|
||||
ancTe.resource.push(res);
|
||||
ancTe.resource.set(v, new Resource(v, type));
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user