diff --git a/Assets/Objects/Tiles.glb b/Assets/Objects/Tiles.glb index 10fee11..bd49be2 100644 Binary files a/Assets/Objects/Tiles.glb and b/Assets/Objects/Tiles.glb differ diff --git a/Scripts/Helpers/DecorationHandler.cs b/Scripts/Helpers/DecorationHandler.cs index b5f4f38..5f2e27f 100644 --- a/Scripts/Helpers/DecorationHandler.cs +++ b/Scripts/Helpers/DecorationHandler.cs @@ -1,4 +1,5 @@ using Godot; +using System; using System.Collections.Generic; public class DecorationHandler @@ -26,8 +27,6 @@ public class DecorationHandler decoration.Position = placeholder.pos; - decoration.Rotate(Vector3.Up, Mathf.DegToRad(-90)); - if (key == "light") { decoration.AddChild(new OmniLight3D() diff --git a/Scripts/Helpers/Placeholder.cs b/Scripts/Helpers/Placeholder.cs index 94ac40f..23d72ab 100644 --- a/Scripts/Helpers/Placeholder.cs +++ b/Scripts/Helpers/Placeholder.cs @@ -6,7 +6,7 @@ public class Placeholder public Vector3 pos; public Placeholder(string name, Vector3 pos){ - this.name = name; + this.name = name.Split("_")[0]; this.pos = pos; GD.Print($"Generated placeholder {this.name}"); } diff --git a/Scripts/World.cs b/Scripts/World.cs index b878a70..654f799 100644 --- a/Scripts/World.cs +++ b/Scripts/World.cs @@ -16,6 +16,12 @@ 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() { @@ -80,6 +86,7 @@ public partial class World : Node3D if (Input.IsActionJustPressed("layer_down") && currentLayer < ruinSize - 1) currentLayer++; if (currentLayer != visibleLayer) { + map[visibleLayer].ClearDecorations(); HandleRenderData(BuildRenderData(currentLayer)); visibleLayer = currentLayer; } @@ -109,7 +116,6 @@ public partial class World : Node3D for (int y = 0; y < layerSize; y++) { Tile tile = layer.tiles[x, y]; - result.Add(new TileRenderData { Tile = tile,