summaryrefslogtreecommitdiff
path: root/Scenes/Builder.gd
diff options
context:
space:
mode:
authorVictor Andrade de Almeida <vct.a.almeida@gmail.com>2022-07-17 02:58:01 -0300
committerVictor Andrade de Almeida <vct.a.almeida@gmail.com>2022-07-17 02:58:13 -0300
commit8d61124b3dbeacbf71f0b5a2a53dc7f53e88a310 (patch)
treed36a196ea0ad980bcb58308a66dd907f227d04c8 /Scenes/Builder.gd
parent9796ffe09423c849430929a509f6615a9f8f5106 (diff)
downloadgamejam-gmtk-2022-8d61124b3dbeacbf71f0b5a2a53dc7f53e88a310.tar.gz
gamejam-gmtk-2022-8d61124b3dbeacbf71f0b5a2a53dc7f53e88a310.tar.bz2
gamejam-gmtk-2022-8d61124b3dbeacbf71f0b5a2a53dc7f53e88a310.zip
Fix ground
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)