23 lines
461 B
C#
23 lines
461 B
C#
using Godot;
|
|
using System.Collections.Generic;
|
|
|
|
public static 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)) continue;
|
|
|
|
light.LightColor = color;
|
|
availableLights.Add(light);
|
|
}
|
|
|
|
lights = availableLights;
|
|
}
|
|
}
|