Added basic light controls to the game and added more content spawnpoints. Adjusted values a bit.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
uid://b150nxl3cc3ck
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user