Happy Aloha Friday :) Today is day 11 of my 74 day challenge to become a Unity Game Developer!
Had yet another good day today. I continued to add more features and worked on debugging little issues as they came up. Today I also spent time collaborating and working through issues with a fellow intern Ryan Yamura, which has given me an opportunity to see how someone else approaches the same problem. Definitely learned ALOT and look forward to collaborating with and learning from my teammates throughout this journey! We really do have an awesome team :)
Check out some of the new features I added today:
Here is a walk through of a challenge I solved:
Challenge: “Create a powerup that negatively affects the player.” For this challenge I wanted to create a negative powerup that would prevent the player from being able to shoot the laser for 5 seconds. The first thing I needed to do was create a prefab for the negative powerup. I created something simple by removing the text from another powerup sprite and changing the color of it in the sprite renderer.
Then in the Player class I created a GameObject to hold the new negative powerup sprite and a bool to signify whether or not it was active. From there I created a NegativeBoost() that sets the bool equal to true and starts a coroutine to add in a 5 second delay before setting it back to false.
I also adjusted the if statement in my LaserBehavior() to check if the bool is equal to false before firing the laser. This is how I achieved my desired outcome of disabling any laser fire for 5 seconds. By doing it this way, I ensure that regardless of what type of laser is firing, the 5 second delay will still execute.
Lastly, I needed to add in the case id in the powerup script and update the size of the powerup array from the spawn manager script in the inspector. Also in the spawn manager I needed to update the range for the int generating the index used to spawn the power ups at random.
Here are a few other things that I worked on today:
- Added an ammo powerup, health powerup, and created a superlaser prefab to be used to create another powerup which will provide new shooting capabilities.
- Updated my new enemy with the help of a tech lead. Turns out I forgot to add a condition in the animator which was causing the animation to execute soon after it instantiated.
Challenge I faced:
- My computer crashed. Will be working on getting the performance up this weekend.
Tomorrow I want to try to do something, anything? with the pumpkins I added. I also want to try and animate my new powerups so it flows better with the rest of the game.
Have a good night :-).