Layered Defense: Adding Enemy Shields (Game Dev Day 45)

Two new variables.
Enemy Shield has been dragged in. I duplicated one of the player shields and renamed it.
Int X will be a random number between 1–99
I reused this same chunk of code for if a missile hits the shield as well.
Some enemies get shields, and those shields block a single shot.



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!