using Godot;
using System.Collections.Generic;

public class LightHandler
{
    public static List<OmniLight3D> lights = new List<OmniLight3D>();

    public static void RedrawLights(Color color)
    {
        List<OmniLight3D> availableLights = new List<OmniLight3D>();

        foreach (OmniLight3D light in lights)
        {
            if (GodotObject.IsInstanceValid(light))
            {
                light.LightColor = color;
                availableLights.Add(light);
            }
        }

        lights = availableLights;
    }
}
