Added basic light controls to the game and added more content spawnpoints. Adjusted values a bit.

This commit is contained in:
=
2026-04-27 19:35:21 +02:00
parent 6a7f4690f2
commit 92a86c13b7
8 changed files with 34 additions and 4 deletions
+15
View File
@@ -0,0 +1,15 @@
using Godot;
using System.Collections.Generic;
public class LightHandler
{
public static List<OmniLight3D> lights = new ();
public static void RedrawLights(Color color)
{
foreach(OmniLight3D light in lights)
{
light.LightColor = color;
}
}
}
+1
View File
@@ -0,0 +1 @@
uid://b150nxl3cc3ck
+7 -1
View File
@@ -4,7 +4,7 @@ public partial class UIHandler : Control
{
public override void _Ready()
{
GetNode<ColorPickerButton>("./MainUI/HeaderContainer/Header/LightColor").Color = GameData.lightColor;
}
// Called every frame. 'delta' is the elapsed time since the previous frame.
@@ -13,4 +13,10 @@ public partial class UIHandler : Control
}
public void ChangeColor(Color color)
{
GameData.lightColor = color;
LightHandler.RedrawLights(color);
}
}