Cleaned up project with better structure.
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user