Fix certain elements not showing on loading screen on mobile
This commit is contained in:
parent
986e907894
commit
4b77ba8c39
|
@ -254,6 +254,8 @@ export class LoadingScene extends SceneBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
loadLoadingScreen() {
|
loadLoadingScreen() {
|
||||||
|
const mobile = isMobile();
|
||||||
|
|
||||||
const loadingGraphics: any[] = [];
|
const loadingGraphics: any[] = [];
|
||||||
|
|
||||||
const bg = this.add.image(0, 0, '');
|
const bg = this.add.image(0, 0, '');
|
||||||
|
@ -318,7 +320,7 @@ export class LoadingScene extends SceneBase {
|
||||||
|
|
||||||
loadingGraphics.push(bg, graphics, progressBar, progressBox, logo, percentText, assetText);
|
loadingGraphics.push(bg, graphics, progressBar, progressBox, logo, percentText, assetText);
|
||||||
|
|
||||||
if (!isMobile())
|
if (!mobile)
|
||||||
loadingGraphics.map(g => g.setVisible(false));
|
loadingGraphics.map(g => g.setVisible(false));
|
||||||
|
|
||||||
const destroyLoadingAssets = () => {
|
const destroyLoadingAssets = () => {
|
||||||
|
@ -348,9 +350,13 @@ export class LoadingScene extends SceneBase {
|
||||||
break;
|
break;
|
||||||
case 'loading_bg':
|
case 'loading_bg':
|
||||||
bg.setTexture('loading_bg');
|
bg.setTexture('loading_bg');
|
||||||
|
if (mobile)
|
||||||
|
bg.setVisible(true);
|
||||||
break;
|
break;
|
||||||
case 'logo':
|
case 'logo':
|
||||||
logo.setTexture('logo');
|
logo.setTexture('logo');
|
||||||
|
if (mobile)
|
||||||
|
logo.setVisible(true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue