We made it to Chapter 6! This is where we shall add the fun parts to the game. We shall be setting up the props and also assigning new features to our existing sprites! We shall also look at how we are allowing the user to fire her laser beams.
Code for this chapter is found on GitHub or by checking out the chapter/5 branch. Our spaceship is created and can move around the screen. Let’s add a new feature that allows our spaceship to shoot! Phaser comes with a handy ability to shoot/fire feature, as it has a built-in method that we can call to assist ...