Phase I — Progress report — Shield health

Luke Duckett
2 min readApr 29, 2021

--

In today's update will go over the shield hit point system I have added to the game. I almost implemented a great animated shield shader as well, but I’m not across the shader system yet so keep an eye out for that one in the future.

Shield health

I’ve changed the way the shield operates in-game. Previously the shield gave the player a free hit and the shield would deactivate. With the implementation of the ammo system, the difficulty has increased a lot so I have added some hit points to the shield.

The shield now has 3 stages, full health, damaged and critical. All 3 stages are differentiated by a colour change. The colours can be set in the inspector at will.

The changes to the code only required adding a shield health check instead of just deactivating the shield if the player took damage while the shield was active.

We check the shield health using a switch statement and adjust the colours according to what we have in the inspector whenever the player takes damage while the shield is active.

Now, all we need is to see it in action.

That's all for now.

--

--

Luke Duckett
Luke Duckett

Written by Luke Duckett

🎮 First Nations Unity Dev from Wonnarua country 🏞️ | From Player to Lifelong Learner: Crafting Games, Debugging Code, and Embracing New Technology

No responses yet