Jump to content

How to load asset before preloading screen?


Html5Overview
 Share

Recommended Posts

I have a problem adding sprite to my background while the first initial scene is loading. Could someone please check the video out and if you know how to load sprite before preloading screen.

 

By reading documents, my asset needs to be before 'start' scene event, since that's when my loading screen starts to load assets. Now, is there an event before start and can I load my asset in my game config?


https://streamable.com/bc3ej

Link to comment
Share on other sites

http://labs.phaser.io/edit.html?src=src\loader\scene payload\scene files payload.js

If it's just a small amount of assets use the above method.

If it's more, create a Boot Scene specifically for loading them, then move to a Preloader scene to get the rest of the game files, before finally going to your game scene.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...