diff options
author | Henrique Alves <henriquelalves@gmail.com> | 2022-07-17 03:19:22 -0300 |
---|---|---|
committer | Henrique Alves <henriquelalves@gmail.com> | 2022-07-17 03:19:22 -0300 |
commit | 7b69ce92f24f3e49b8a8325ecd8c400c188910ea (patch) | |
tree | e78bb5000c98b2f442c6804ac33b2882b0407fde /Scenes/Builder.gd | |
parent | 7aedfb8f07481cabf26e1aa48da5fa89e26e4f96 (diff) | |
parent | 6aa4d7ad1d9ed089ba8c01c85a28c2137e220415 (diff) | |
download | gamejam-gmtk-2022-7b69ce92f24f3e49b8a8325ecd8c400c188910ea.tar.gz gamejam-gmtk-2022-7b69ce92f24f3e49b8a8325ecd8c400c188910ea.tar.bz2 gamejam-gmtk-2022-7b69ce92f24f3e49b8a8325ecd8c400c188910ea.zip |
Merge remote-tracking branch 'origin/main'
Diffstat (limited to 'Scenes/Builder.gd')
-rw-r--r-- | Scenes/Builder.gd | 5 |
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) |