Adding a health powerup in Unity
Objective: Create an animated health power up that boosts player health by one, but not more than three.

Create sprites using Power Point, or another program. Drag them into the Unity Assets Sprite folder. Select them to set the texture type to Sprite (2D and UI) and check alpha is transparency.

Create Health_Powerup game object using the powerup4_0000 sprite, add a circle collider 2D with is trigger checked, rigidbody 2D with zero gravity. Create animation Health_powerup_anim and drag the sprite sequence into the animation window. Drag the Health_Powerup into the the prefab folder and delete the game object.

Add Powerup script by to Health_Powerup prefab. Add a case 3 for the powerup as shown below. In the inspector change the Powerup ID to 3 in the power up script and add the audio, power_up_sound from GameDevHQ filebase.

In the Spawn_Manager, IEnumerator SpawnPowerups() change the int powerupID from Random.Range(0, 3) to RandomRange(0,4). Increase the number of powerup prefabs to 4 and assign the Health_Powerup prefab in Unity inspector, as shown below.

In the Player script, create a public void HealthBoost function, shown below. This function modifies _lives, damage animation and calls UpdateLives from UI manager script, noting that the _uiManager has previously be been assigned and null checked using GetComponent.
