Day 20 of my Developer Journey: Shield visualizer
Dec 18, 2021
Objective: Create a shield sprite that follows the player and can be activated or deactivated depending on if shields are on or off
This is rather simple. First, we will take the shields sprite and make it a child of the player.
Now we will add a variable reference to the shields as an object.
Next we will use the .SetActive command to toggle the object on and off.
In the inspector assign the sprite to the _shieldsVisualizer for the player and you are set!
Objective: COMPLETED