Unity Tanks Game Lesson 2 Add Shell Creation and Firing - jasonweibel/HyperStream-Unity GitHub Wiki
Hyperstream : Unity Tanks Game - Lesson 2 - Add Shell Creation and Firing
Update TankShooting.cs File
-
Open TankShooting.cs file in Visual Studio
-
Uncomment public and private properties.

-
Uncomment OnEnable method

-
Uncomment Start method

-
Uncomment Fire method

-
Uncomment Update method

Update TankManager.cs File
-
Open TankManager.cs file in Visual Studio
-
Uncomment line 36.

-
Uncomment line 57

-
Uncomment line 67

Update ShellExplosion.cs File
-
Open ShellExplosion.cs file in Visual Studio
-
Uncomment public properties

-
Uncomment Start method

-
Uncomment CalculateDamage method

-
Uncomment OnTriggerEnter method

Update TankShooting.cs File
-
Open TankShooting.cs File in Visual Studio
-
In Fire method uncomment lines 97 and 98.

-
In Update method uncomment lines 64 and 65.

Add Tank Shooting Script to Tank Prefab
-
Select Tank Prefab

-
Add Script TankShooting
-
Set Script Properties
Todo - figure out how AimSlider gets assigned.
Add Shell Explosion Script to Shell Prefab
-
Select Shell Prefab

-
Add Shell Explosion Script Component



-
Set Properties
Drag the CompleteShellExplosion prefab onto the Explosion Particles property.
Attachments:
image2017-8-12_10-10-17.png (image/png)
image2017-8-12_10-10-30.png (image/png)
image2017-8-12_10-10-42.png (image/png)
image2017-8-12_10-11-11.png (image/png)
image2017-8-12_10-11-31.png (image/png)
image2017-8-12_10-12-24.png (image/png)
image2017-8-12_10-12-48.png (image/png)
image2017-8-12_10-13-8.png (image/png)
image2017-8-12_10-13-37.png (image/png)
image2017-8-12_10-13-50.png (image/png)
image2017-8-12_10-14-4.png (image/png)
image2017-8-12_10-14-21.png (image/png)
image2017-8-12_10-14-45.png (image/png)
image2017-8-12_10-14-57.png (image/png)
image2017-8-12_10-15-28.png (image/png)
image2017-8-12_10-15-56.png (image/png)
image2017-8-12_10-16-28.png (image/png)
image2017-8-12_10-16-49.png (image/png)
image2017-8-12_10-16-58.png (image/png)
image2017-8-12_10-17-3.png (image/png)
image2017-8-12_10-17-24.png (image/png)