Reworked DSL for better architecture, implemented wall-phasing movement.

This commit is contained in:
=
2026-04-29 15:13:38 +02:00
parent 832fb47ec0
commit a0109891e1
14 changed files with 172 additions and 139 deletions
+4 -21
View File
@@ -6,7 +6,6 @@ public partial class UIHandler : Control
{
[Export] CodingWindow codingWindow;
[Export] RobotList robotList;
[Export] PanelContainer robotNaming;
[Export] Information information;
[Export] Camera3D mainCam;
public override void _Ready()
@@ -19,7 +18,8 @@ public partial class UIHandler : Control
{
robotList.OnRobotJumpTo += (robot) =>
{
mainCam.Position = new Vector3(robot.Position.X, mainCam.Position.Y, robot.Position.Z);
mainCam.Position = new Vector3(robot.Position.X, mainCam.Position.Y, robot.Position.Z + 3f);
ShowCodingWindow(robot);
};
}
@@ -29,25 +29,8 @@ public partial class UIHandler : Control
LightHandler.RedrawLights(color);
}
public void ShowNamingPopup(Robot robot)
public void ShowCodingWindow(Robot robot)
{
robotNaming.Visible = true;
GameData.canMove = false;
LineEdit name = robotNaming.GetNode<LineEdit>("./VBoxContainer/LineEdit");
name.Text = robot.Name;
Button button = robotNaming.GetNode<Button>("./VBoxContainer/Button");
Action handler = null;
handler = () =>
{
robot.Name = name.Text;
name.Text = "";
robotNaming.Visible = false;
GameData.canMove = true;
button.ButtonUp -= handler;
};
button.ButtonUp += handler;
codingWindow.ShowWindow(robot);
}
}