Space Shooter Features: Shield Strength

Shield Strength feature:

  • Visualize the strength of the shield. This can be done through UI onscreen or color changing of the shield.
  • Allow for 3 hits on the shield to accommodate visualization.

Steps

  1. Add a Scrollbar UI element and a Text element to the Canvas object. Set the correct position for these elements and rename the Text element to “Shield”.

2. Create a variable for the Scrollbar UI object, turn off the visibility of the screenbar at startup, and create a method that will update the scrollbar.

3. Update the Damage method in the Player script to make the shield last for 3 hits, after which time the shield and shield bar will be disabled.

Two UI objects and small modifications in 2 scripts were needed to create this functionality.

--

--

--

Hi, I’m Damian, a Unity Software Engineer who loves building education and simulation games.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Midterm Project — Life of Tangerine

We’ve been content designers for a while — but now it’s official

myboat — a faster water channel transport from mytaxi

The epic ‘Game of Go’: a real-time experience showcasing Nike’s latest React technology

Few facts about Design thinking and its influence on Business

UX Case Study : Redesign Inbox Page Kitabisa.com

Design, Brands, and Futures

Playfull Mailbox Feature

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
Damian Dąbrowski

Damian Dąbrowski

Hi, I’m Damian, a Unity Software Engineer who loves building education and simulation games.

More from Medium

What is a Signal Emitter in Timeline

Light her up — Adding emissions to your game objects using photoshop and blender

Loading Scenes In Unity

Unity Tutorial — Toon Shade in HLSL