Join Joseph Labrecque for an in-depth discussion in this video Bunny death, part of HTML5 Game Development with Phaser.
…While we are currently decrementing our bunny count upon space rock collision or…friendly fire, we have no real indicator of what just happened.…A user may not understand that a bunny has been lost.…To remedy this,…we'll create a ghost which will speed toward the upper atmosphere post-impact.…To do this,…the first thing we need to do is load in the asset that will represent that.…Moving over to our preloader, directly beneath the explosion inside of…our preload function, we're going to say, this.load.image.…
And here, we'll tag this as ghost, so that we can identify it later.…And this'll point to images/ghost.png.…Popping back over to game.js, we'll now create this makeGhost function.…So, let's go all the way down to, after our friendly fire function.…And this is a lengthy function, so I will paste it in from the code snippets.…And, we can see that makeGhost is a function or…a passing in our particular bunny instance.…
The reason we're doing that is because we need to know the x and…y position of our bunny as well as its scale x.…
- 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.