Sitemap

Reloading!

Mar 27, 2021

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:

Press enter or click to view image in full size

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:

Press enter or click to view image in full size

Alright, now we test!

Press enter or click to view image in full size

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

--

--

Andrew Lengen
Andrew Lengen

Written by 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!