Day 12: C Not So Sharp

Brittany Lumanlan Martin
2 min readDec 9, 2020

--

I wanted to showcase a few of the changes I made today with my free background from the Unity Assets Store and music via freemusicarchive.com

Coming out of the slump I was in yesterday was an arduous process. As you can see in the video above, my shield visualizer will now cycle through different colors. The catch is that the shield only absorbs one hit instead of the intended three, and the player can die while the shield is still active. I thought I had sorted out this buggy bit of code, but the issue persists. I plan on going back and making adjustments, but for now have decided to move forward as to not dwell on this section for too long.

The next task I completed was creating an ammo limit and counter, located in the lower lefthand corner of the game. Although I did not struggle as much with this section as I did the last, it did take me a large portion of the work day to configure.

I began this section by creating the “MAX AMMO” and “CURRENT AMMO” texts, then attached them to the UI Manager script. From there, I set the max ammo amount to 15 for the player. As for enabling the current ammo text to update each time a laser was fired, that was an entirely different animal altogether. I could see the ammo count decrease in a serialized field attached to the player, but it wouldn’t update on the front end. Finally, after many tries, I wrote a proper script to trigger the current ammo text to accurately update with each fired laser. Once the count reaches zero, the laser is disabled.

This tricky bit of script took ages to write.

Tomorrow, I will create a collectible powerup that will refill the player’s ammo count. This feature does not have a sprite, so I will have to create an animation for it — which is exciting! I am loving the process of sprite customization, and in the video above you’ll notice I’ve made adjustments to my background and music. My main focus in Phase I is of course framework, but I very much enjoy making quick personalizations to the game.

--

--

Brittany Lumanlan Martin
Brittany Lumanlan Martin

No responses yet