diff options
author | Henrique Alves <henriquelalves@gmail.com> | 2022-07-16 23:10:35 -0300 |
---|---|---|
committer | Henrique Alves <henriquelalves@gmail.com> | 2022-07-16 23:10:35 -0300 |
commit | d9b6fb632ab93ef0adbef73027d06be80ff64165 (patch) | |
tree | 94ede04782eb5f4ee89e310cdcc2370fbe19205b | |
parent | 46598a704a1c42862fbdc777e46c9cbe4a928d39 (diff) | |
parent | 223868a31e8a7e4ae28f5bea1920cc460a3cec43 (diff) | |
download | gamejam-gmtk-2022-d9b6fb632ab93ef0adbef73027d06be80ff64165.tar.gz gamejam-gmtk-2022-d9b6fb632ab93ef0adbef73027d06be80ff64165.tar.bz2 gamejam-gmtk-2022-d9b6fb632ab93ef0adbef73027d06be80ff64165.zip |
Merge remote-tracking branch 'origin/main'
-rw-r--r-- | Scenes/Builder.gd | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/Scenes/Builder.gd b/Scenes/Builder.gd index f144104..c26dfa3 100644 --- a/Scenes/Builder.gd +++ b/Scenes/Builder.gd @@ -117,23 +117,22 @@ func build(player : Entity, dungeon): func build_obstacle(pos : Vector2, dungeon): var object = Obstacle.instance() dungeon.add_child(object) - dungeon.set_tile(object, pos) + dungeon.set_tile(object, pos.round()) func build_plate_damage(pos : Vector2, dungeon): var object = PlateDamage.instance() dungeon.add_child(object) - dungeon.set_tile(object, pos) + dungeon.set_tile(object, pos.round()) func build_crystal(pos_crystal : Vector2, pos_key : Vector2, dungeon): var crystal = Crystal.instance() + dungeon.add_child(crystal) + dungeon.set_tile(crystal, pos_crystal.round()) + var key = PlateKey.instance() key.set_crystal(crystal) - - dungeon.add_child(crystal) dungeon.add_child(key) - - dungeon.set_tile(crystal, pos_crystal) - dungeon.set_tile(key, pos_key) + dungeon.tiles_floor[pos_key.round()] = key func build_divider(pos : Vector2, dir : Vector2, count : int, dungeon): if count == 3: |