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 add collectables from Tiled and load them into our game.
Adjust Player's Collision box
// Add this to LevelOne.js to adjust the player’s collision box
this.#player.body.setSize(this.width, 150)
this.#player.setOffset(0,105)
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
In this video, we're going to learn
how to add collectibles to our level.
0:00
If you remember from the previous videos,
we added some coins to our level in Tiled.
0:02
But we used an object layer for
0:08
our coins instead of a tile layer
which is what we used for our ground.
0:09
So the process to load the coins
in will be a little different.
0:15
Since we've already preloaded the coin
image in our preload method, we won't
0:20
have to do that again, we can just go
ahead and load in the layer from Tiled.
0:25
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