Unity Tanks Game Lesson 3 Add Tank Health - jasonweibel/HyperStream-Unity GitHub Wiki

Hyperstream : Unity Tanks Game - Lesson 3 - Add Tank Health

Update TankHealth Script

  1. Open TankHealth.cs script in Visual Studio.

  2. Uncomment public and private properties.

  3. Uncomment Awake Method

  4. Uncomment SetHealthUI method

  5. Uncomment OnDeath method

  6. Uncomment OnEnable method

  7. Uncomment Take Damage method

Update ShellExplosion.cs Script

  1. Open ShellExplosion.cs file in Visual Studio

  2. Uncomment line 52.

Add Tank Health Script to Tank Prefab

  1. Select Tanks Prefab

  2. Add a Scripts --> Complete --> Tank Health

  3. Set Tank Health Script properties

Attachments:

image2017-8-12_8-51-36.png (image/png)
image2017-8-12_8-52-4.png (image/png)
image2017-8-12_8-52-23.png (image/png)
image2017-8-12_8-52-44.png (image/png)
image2017-8-12_8-53-5.png (image/png)
image2017-8-12_8-53-27.png (image/png)
image2017-8-12_8-54-28.png (image/png)
image2017-8-12_8-54-58.png (image/png)
image2017-8-12_8-55-23.png (image/png)