…Collision detection is an important aspect of our game, and…phaser makes detecting object collisions very simple.…We'll be suing the phaser update method to check specific collisions against…entities within both our space rock group, and the emitter particles.…So inside of Game.js we'll scroll all the way down to the bottom.…And here we'll find our update function.…This is something that we created when we built out this state, but…we haven't actually done anything with it yet.…So let's add some collision detection.…
Upon update.…To do this, we'll use the physics arcade collision detection.…This is the physics system that we've been using throughout this game.…So if this.physics.arcade.overlap.…And there are a number of different things we need to feed into this function.…The first two are the two objects or…groups that we need to test for collisions against.…So the first will be this.spacerockgroup, and…the second is going to be our emitter so this.burst.…
Next we need to determine a function that's going to be called…
- Downloading the Phaser framework
- Creating your first Phaser project
- Building the preloader and menu states
- Creating and spawning entities
- Working with particles and emitters
- Detecting and handling collisions
- Detecting "game over"
- Adding sound effects and text
- Preparing for mobile deployment
Skill Level Beginner
1. Setting Up Phaser
2. Configuring Loaders and States
3. Populating the World
5. Wrapping Things Up
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.