diff options
author | Victor Andrade de Almeida <vct.a.almeida@gmail.com> | 2022-07-16 22:51:59 -0300 |
---|---|---|
committer | Victor Andrade de Almeida <vct.a.almeida@gmail.com> | 2022-07-16 22:51:59 -0300 |
commit | 223868a31e8a7e4ae28f5bea1920cc460a3cec43 (patch) | |
tree | cd145951a459c6d595f450aea802d70cc0bdb7ea | |
parent | 9eb8b91fe0abff8764c2d6c0a5edeceb68f5626e (diff) | |
download | gamejam-gmtk-2022-223868a31e8a7e4ae28f5bea1920cc460a3cec43.tar.gz gamejam-gmtk-2022-223868a31e8a7e4ae28f5bea1920cc460a3cec43.tar.bz2 gamejam-gmtk-2022-223868a31e8a7e4ae28f5bea1920cc460a3cec43.zip |
Round entity positions
-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: |