Adding robots to the game and the ability to click on them
This commit is contained in:
+7
-6
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user