Skip to content

Commit 2890f18

Browse files
author
Ricardo J. Mendez
committed
Added MaxDistance as a parameter
1 parent cd753fc commit 2890f18

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Assets/Sources/LightningBolt.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ public class LightningBolt : MonoBehaviour
1919

2020
public float MaxForce = 5;
2121
public float MaxSpeed = 10;
22+
public float MaxDistance = 0.25f;
2223

2324
Perlin noise;
2425
float oneOverZigs;
@@ -44,9 +45,9 @@ void Start()
4445
vehicles[i].Radius = 0.05f;
4546
vehicles[i].MaxSpeed = MaxSpeed;
4647
vehicles[i].MaxForce = MaxForce;
48+
vehicles[i].MaxDistance = MaxDistance;
4749
vehicles[i].PreviousStrength = 0.5f;
4850
vehicles[i].NextStrength = 1.0f;
49-
vehicles[i].MaxDistance = 0.25f;
5051

5152
if (i < particles.Length - 1)
5253
{

0 commit comments

Comments
 (0)