Fixing loading logo being displayed when nothing was loaded
This commit is contained in:
parent
adb535d1b6
commit
969c9fd544
5 changed files with 14 additions and 8 deletions
|
@ -6,6 +6,10 @@ const LogoResource: string = 'resources/logos/logo.png';
|
|||
const LogoFrame: ImageFrameConfig = {frameWidth: 307, frameHeight: 59};
|
||||
|
||||
export const addLoader = (scene: Phaser.Scene): void => {
|
||||
// If there is nothing to load, do not display the loader.
|
||||
if (scene.load.list.entries.length === 0) {
|
||||
return;
|
||||
}
|
||||
let loadingText: Phaser.GameObjects.Text|null = null;
|
||||
const loadingBarWidth: number = Math.floor(scene.game.renderer.width / 3);
|
||||
const loadingBarHeight: number = 16;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue