A Second Chance: Adding addition lives (Game Dev day 37)

Name it whatever you want.
Sorting Layer = Foreground
The extra life collectable.
This is almost identical to how we programmed damage, but we added a life instead of subtracting one.
This list keeps getting longer.
Line 54, increased second integer from 4 to 5, allowing for all 5 possible powerups to be spawned in.
Success! We gained a life back.
First spawn was an extra life!



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
Jack Leavey

Jack Leavey

I am a software engineer with years of experience branching into game development, specifically in Unity. Follow along for guides on creating game mechanics!