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

37 lines
1,005 B
C#

using System.Collections.Generic;
using UnityEngine;
namespace DigitalRuby.ThunderAndLightning
{
public abstract class LightningBoltPathScriptBase : LightningBoltPrefabScriptBase
{
[Header("Lightning Path Properties")]
[Tooltip("The game objects to follow for the lightning path")]
public List<GameObject> LightningPath;
private readonly List<GameObject> currentPathObjects = new List<GameObject>();
protected List<GameObject> GetCurrentPathObjects()
{
currentPathObjects.Clear();
if (LightningPath != null)
{
foreach (GameObject item in LightningPath)
{
if (item != null && item.activeInHierarchy)
{
currentPathObjects.Add(item);
}
}
}
return currentPathObjects;
}
protected override LightningBoltParameters OnCreateParameters()
{
LightningBoltParameters lightningBoltParameters = base.OnCreateParameters();
lightningBoltParameters.Generator = LightningGenerator.GeneratorInstance;
return lightningBoltParameters;
}
}
}