Video Thumbnail

Sign up for a plan to instantly unlock all premium lessons.


Premium Features

Download Video

Machine Gun Power-Up

Published 10 months ago

Here we'll learn how to create a power-up effect—one that allows your spaceship to shoot yellow projectiles in a machine gun-like rhythm. We'll utilize event listeners, object properties, timers, and randomization to achieve this effect.

Our checklist for this feature is:

  • 0:00 Create MachineGunPowerUp class

  • 01:44 Render and move across screen

  • 03:28 Add collision detection and splices

  • 06:49 Activate power up and set timer

  • 08:31 Create machine gun effect

  • 11:08 Change projectile color

  • 12:18 Limit machine gun

  • 13:44 Garbage collection

  • 16:12 Spawn in random locations


Want to participate?

Create a free Chris Courses account to begin

Athome26 posted 5 months ago

Providing the lift to launch your development career

© 2022 Chris Courses. All rights reserved.