Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Game Development with Phaser!
You have completed Game Development with Phaser!
Preview
Discover how to create a central place to preload all the assets in our game to prevent duplicate preloading.
Resources
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
moving our preload methods
into its own class.
0:00
Right now, our game only has one scene,
so it's okay to put all the assets
0:02
to preloads in the preload
method of our level 1 scene.
0:07
But if we had more scenes we'd have
to create a preload method for
0:11
each scene to load similar assets each
scene will need collectibles enemies
0:15
a player and so on so it's wasteful
to load these assets multiple times.
0:21
It makes much more sense to put all
our assets to preload in one place.
0:26
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up