74 days to become a game developer. Day 13.

Mar McRae
3 min readNov 2, 2020

--

Good evening. Today is day 13 of my 74 day challenge to become a Unity Game Developer!

Here is what my game looks like today:

First off, I fixed the shields issue from my day 12 post! The problem I was having was that I placed the decrement to remove a shield when the player takes a hit within an if statement that checks to see if the shields remaining is greater than 0 . This is what was causing the funky array behavior earlier. At first I thought that the array index was delayed by one on every decrement but the issue was actually specific to the 0 index. What was happening was since I placed the decrement in the if statement for if the remaining shields were greater than 0, even if that decrement brought the shields remaining down to 0, the uiManager.UpdateShield() responsible for updating the UI was being called before the else if() responsible for deactivating the sprite and setting the isShieldActive() to false . This else if() should be called when the remaining shields are equal to 0. By moving the decrement outside of the if statement, it now allows for the correct method to run based on the actual number of shields remaining rather than executing the else if() on the next decrement.

Other things I worked on today:

  • Started to work on adding new behaviors for my green enemy. The intended behavior will be for it to zig zag around. Hopefully I can get that going tomorrow.

Challenge I faced:

  • STILL did not do animations or pumpkins. May need to leave them for the finishing touches for now as there are a lot of other behaviors I still need to add for this game to be certification approved and time is flying by!

Not my very most productive day but I’m happy that I learned some new things and as always am excited to get back at it in the morning. Have a good rest of your Sunday or whatever day it is for you. TTYT.

--

--

No responses yet