Now we need some stars to collect.
As you can tell, we are using the best practices covered in previous parts!
First, the constant STAR_KEY is used to preload the star asset and then to create a group of equally spaced stars in createStars().
Our createStars() method returns the physics group which is used in create() to add a collider for the stars and platforms."
The first book on the creation of HTML5 cross platform games using Phaser 3 and other free software.
- By Emanuele Feronato
- 155 Pages
- 28 Source Code Examples
- Build a complete game from start to finish
- Cross Platform
- Scaling for devices