Merge pull request #1476 from thecodingmachine/fixCustomWoka
FIX: added another catch case for default model
This commit is contained in:
commit
ccea46fe2b
@ -10,6 +10,7 @@ import { DEPTH_INGAME_TEXT_INDEX } from "../Game/DepthIndexes";
|
|||||||
import { waScaleManager } from "../Services/WaScaleManager";
|
import { waScaleManager } from "../Services/WaScaleManager";
|
||||||
import type OutlinePipelinePlugin from "phaser3-rex-plugins/plugins/outlinepipeline-plugin.js";
|
import type OutlinePipelinePlugin from "phaser3-rex-plugins/plugins/outlinepipeline-plugin.js";
|
||||||
import { isSilentStore } from "../../Stores/MediaStore";
|
import { isSilentStore } from "../../Stores/MediaStore";
|
||||||
|
import { lazyLoadPlayerCharacterTextures } from "./PlayerTexturesLoadingManager";
|
||||||
|
|
||||||
const playerNameY = -25;
|
const playerNameY = -25;
|
||||||
|
|
||||||
@ -57,10 +58,17 @@ export abstract class Character extends Container {
|
|||||||
this.sprites = new Map<string, Sprite>();
|
this.sprites = new Map<string, Sprite>();
|
||||||
|
|
||||||
//textures are inside a Promise in case they need to be lazyloaded before use.
|
//textures are inside a Promise in case they need to be lazyloaded before use.
|
||||||
texturesPromise.then((textures) => {
|
texturesPromise
|
||||||
this.addTextures(textures, frame);
|
.then((textures) => {
|
||||||
this.invisible = false;
|
this.addTextures(textures, frame);
|
||||||
});
|
this.invisible = false;
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
return lazyLoadPlayerCharacterTextures(scene.load, ["color_22", "eyes_23"]).then((textures) => {
|
||||||
|
this.addTextures(textures, frame);
|
||||||
|
this.invisible = false;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
this.playerName = new Text(scene, 0, playerNameY, name, {
|
this.playerName = new Text(scene, 0, playerNameY, name, {
|
||||||
fontFamily: '"Press Start 2P"',
|
fontFamily: '"Press Start 2P"',
|
||||||
|
Loading…
Reference in New Issue
Block a user