summaryrefslogtreecommitdiff
path: root/scripts/Map.cs
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/Map.cs')
-rw-r--r--scripts/Map.cs27
1 files changed, 27 insertions, 0 deletions
diff --git a/scripts/Map.cs b/scripts/Map.cs
new file mode 100644
index 0000000..6bdd4a4
--- /dev/null
+++ b/scripts/Map.cs
@@ -0,0 +1,27 @@
+using Godot;
+using System;
+
+public partial class Map : Node2D
+{
+ public MapData Map_Data { get; private set; }
+
+ [Export]
+ public int Height;
+ [Export]
+ public int Width;
+
+ private void PlaceTiles() {
+ foreach (Tile tile in Map_Data.Tiles) {
+ AddChild(tile);
+ }
+ }
+
+ public override void _Ready()
+ {
+ base._Ready();
+
+ Map_Data = new MapData(Width, Height);
+
+ PlaceTiles();
+ }
+}