diff --git a/scenes/Game.cs b/scenes/Game.cs index a133fc2..1dfe31c 100644 --- a/scenes/Game.cs +++ b/scenes/Game.cs @@ -75,6 +75,10 @@ public class Game : Spatial _camera = (Camera)FindNode("Camera"); _cameraOffset = _camera.GlobalTranslation - _player.GlobalTranslation; + // populate UI values + Slider generatorWorldSizeSlider = worldGeneratorContainer.GetNode("HBoxContainer/WorldSizeSlider"); + generatorWorldSizeSlider.Value = _tileWorld.Size; + Debug.Assert(_tileWorld != null); // resources diff --git a/scenes/Game.tscn b/scenes/Game.tscn index d64d36c..6314f18 100644 --- a/scenes/Game.tscn +++ b/scenes/Game.tscn @@ -44,6 +44,7 @@ visible = false transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.1, 0 ) [node name="TileWorld" parent="." instance=ExtResource( 8 )] +Size = 32 [node name="DebugContainer" type="PanelContainer" parent="."] visible = false diff --git a/scenes/TileWorld.cs b/scenes/TileWorld.cs index 46d67db..c605902 100644 --- a/scenes/TileWorld.cs +++ b/scenes/TileWorld.cs @@ -21,7 +21,7 @@ public class TileWorld : Spatial delegate void WorldGenerated(); // public members - public int Size = 11; + [Export] public int Size = 64; public float HeightScale = 2.0f; public Image Heightmap; public Image Colormap;