summaryrefslogtreecommitdiff
path: root/Scenes/Builder.gd
diff options
context:
space:
mode:
Diffstat (limited to 'Scenes/Builder.gd')
-rw-r--r--Scenes/Builder.gd5
1 files changed, 5 insertions, 0 deletions
diff --git a/Scenes/Builder.gd b/Scenes/Builder.gd
index b0d4166..8413e6e 100644
--- a/Scenes/Builder.gd
+++ b/Scenes/Builder.gd
@@ -1,5 +1,6 @@
extends Node
+const Ground = preload("res://Scenes/Ground.tscn")
const Obstacle = preload("res://Scenes/Obstacle.tscn")
const Crystal = preload("res://Scenes/Crystal.tscn")
@@ -92,6 +93,10 @@ func build(player : Entity, dungeon):
var length = room_size + 1
var corner = key * length
+ var ground = Ground.instance()
+ dungeon.add_child(ground)
+ ground.translation = dungeon.tile_to_pos(corner + Vector2.ONE / 2)
+
for i in range(0, length):
if not rooms.has(key + Vector2(-1, 0)):
build_obstacle(corner + Vector2(0, i), dungeon)