Adding wokalist type checking on front
Additionally, we are making superLoad.json accept a new "immediateCallback" parameter that resolves during the event handler (and not after)
This commit is contained in:
@@ -15,39 +15,4 @@ export abstract class AbstractCharacterScene extends ResizableScene {
|
||||
this.playerTextures = new PlayerTextures();
|
||||
this.superLoad = new SuperLoaderPlugin(this);
|
||||
}
|
||||
|
||||
loadCustomSceneSelectCharacters(): Promise<BodyResourceDescriptionInterface[]> {
|
||||
const textures = this.playerTextures.getTexturesResources(PlayerTexturesKey.Woka);
|
||||
const promises: CancelablePromise<Texture>[] = [];
|
||||
const bodyResourceDescriptions: BodyResourceDescriptionInterface[] = [];
|
||||
if (textures) {
|
||||
for (const texture of Object.values(textures)) {
|
||||
if (texture.level === -1) {
|
||||
continue;
|
||||
}
|
||||
promises.push(loadWokaTexture(this.superLoad, texture));
|
||||
bodyResourceDescriptions.push(texture);
|
||||
}
|
||||
}
|
||||
return Promise.all(promises).then(() => {
|
||||
return bodyResourceDescriptions;
|
||||
});
|
||||
}
|
||||
|
||||
loadSelectSceneCharacters(): Promise<BodyResourceDescriptionInterface[]> {
|
||||
const promises: CancelablePromise<Texture>[] = [];
|
||||
const bodyResourceDescriptions: BodyResourceDescriptionInterface[] = [];
|
||||
for (const textures of this.playerTextures.getLayers()) {
|
||||
for (const texture of Object.values(textures)) {
|
||||
if (texture.level !== -1) {
|
||||
continue;
|
||||
}
|
||||
promises.push(loadWokaTexture(this.superLoad, texture));
|
||||
bodyResourceDescriptions.push(texture);
|
||||
}
|
||||
}
|
||||
return Promise.all(promises).then(() => {
|
||||
return bodyResourceDescriptions;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user