Moved robots to separate folders and a dedicated robotlist in the UI

This commit is contained in:
=
2026-04-29 14:08:02 +02:00
parent 17057487d6
commit 832fb47ec0
15 changed files with 176 additions and 47 deletions
+6 -1
View File
@@ -12,7 +12,12 @@ public partial class ResourceLoader
public static PackedScene LoadRobotPrefab()
{
return GD.Load<PackedScene>($"res://Prefabs/Robot.tscn");
return GD.Load<PackedScene>($"res://Prefabs/Robot/Robot.tscn");
}
public static PackedScene LoadRobotDisplay()
{
return GD.Load<PackedScene>($"res://Prefabs/Robot/RobotDisplay.tscn");
}
public static Dictionary<string, MeshInstance3D> LoadTiles()
+2 -3
View File
@@ -5,6 +5,7 @@ using Godot;
public partial class UIHandler : Control
{
[Export] CodingWindow codingWindow;
[Export] RobotList robotList;
[Export] PanelContainer robotNaming;
[Export] Information information;
[Export] Camera3D mainCam;
@@ -16,12 +17,10 @@ public partial class UIHandler : Control
// Called every frame. 'delta' is the elapsed time since the previous frame.
public override void _Process(double delta)
{
codingWindow.OnRobotClicked += (robot) =>
robotList.OnRobotJumpTo += (robot) =>
{
mainCam.Position = new Vector3(robot.Position.X, mainCam.Position.Y, robot.Position.Z);
};
codingWindow.OnInformation += information.DisplayInformation;
}
public void ChangeColor(Color color)