LethalCompany/Lethal Company/ExportedProject/Assets/Scripts/Assembly-CSharp/DigitalRuby/ThunderAndLightning/LightningBoltShapeSphereScript.cs
2023-12-22 18:30:10 -05:00

23 lines
649 B
C#

using UnityEngine;
namespace DigitalRuby.ThunderAndLightning
{
public class LightningBoltShapeSphereScript : LightningBoltPrefabScriptBase
{
[Header("Lightning Sphere Properties")]
[Tooltip("Radius inside the sphere where lightning can emit from")]
public float InnerRadius = 0.1f;
[Tooltip("Radius of the sphere")]
public float Radius = 4f;
public override void CreateLightningBolt(LightningBoltParameters parameters)
{
Vector3 start = Random.insideUnitSphere * InnerRadius;
Vector3 end = Random.onUnitSphere * Radius;
parameters.Start = start;
parameters.End = end;
base.CreateLightningBolt(parameters);
}
}
}