Adding robots to the game and the ability to click on them

This commit is contained in:
=
2026-04-26 13:44:15 +02:00
parent bd9de785b4
commit 21199f8026
12 changed files with 155 additions and 9 deletions
+7 -6
View File
@@ -16,12 +16,6 @@ public partial class World : Node3D
Layer layerNode;
private MultiMeshHandler multiMeshHandler;
FastNoiseLite noise = new FastNoiseLite()
{
NoiseType = FastNoiseLite.NoiseTypeEnum.Perlin,
Frequency = 0.05f,
Seed = 1337
};
public override void _Ready()
{
@@ -90,6 +84,13 @@ public partial class World : Node3D
HandleRenderData(BuildRenderData(currentLayer));
visibleLayer = currentLayer;
}
if (Input.IsActionJustPressed("spawn_robot"))
{
Robot robot = ResourceLoader.LoadRobotPrefab().Instantiate<Robot>();
robot.Position = map[0].tiles[1,1].Position;
AddChild(robot);
}
}
private void GenerateWorld()