using System; using System.Threading.Tasks; using Godot; public partial class UIHandler : Control { [Export] CodingWindow codingWindow; [Export] PanelContainer robotNaming; [Export] Camera3D mainCam; public override void _Ready() { GetNode("./MainUI/HeaderContainer/Header/LightColor").Color = GameData.lightColor; } // Called every frame. 'delta' is the elapsed time since the previous frame. public override void _Process(double delta) { codingWindow.OnRobotClicked += (robot) => { mainCam.Position = new Vector3(robot.Position.X, mainCam.Position.Y, robot.Position.Z); }; } public void ChangeColor(Color color) { GameData.lightColor = color; LightHandler.RedrawLights(color); } public void ShowNamingPopup(Robot robot) { robotNaming.Visible = true; GameData.canMove = false; LineEdit name = robotNaming.GetNode("./VBoxContainer/LineEdit"); name.Text = robot.Name; Button button = robotNaming.GetNode