Okay, so I implemented a reload system shortly after the last article and I have a few other things planned out that I wanna get learned and implemented, above I have the variables set-up for the ammo and reloading system, and I’ve prepped my method to be called and I named it _basiclaserReloading:

We have our true-false check to see if we’re reloading or not, we’ve got our timer going off and counting down to simulate reloading, and we’ve got our ammo refreshing if we hit 0 (zero). We just need to add a line of code in our _firingBasicLaser method:

Alright, now we test!

Barrel Roll? Okay, that might be put off for a bit but we’ll eventually make cube do a barrel roll!



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Andrew Lengen

If ambition and practicality amalgamated, it would be me! I am here to climb the mountains of my ambition and catalog my journey so that someone can be changed!