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 LightningPath; private readonly List currentPathObjects = new List(); protected List 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; } } }