diff options
author | Victor Andrade de Almeida <vct.a.almeida@gmail.com> | 2022-07-17 14:53:44 -0300 |
---|---|---|
committer | Victor Andrade de Almeida <vct.a.almeida@gmail.com> | 2022-07-17 14:53:44 -0300 |
commit | f1ec2f4195050d1b7620f8723522ea680828e01e (patch) | |
tree | b9301cc1e388b2b2fa95fcedd7b7e7ce24e31139 | |
parent | 608b6275b9949363c12c1a6348624246d8a7f9e2 (diff) | |
download | gamejam-gmtk-2022-f1ec2f4195050d1b7620f8723522ea680828e01e.tar.gz gamejam-gmtk-2022-f1ec2f4195050d1b7620f8723522ea680828e01e.tar.bz2 gamejam-gmtk-2022-f1ec2f4195050d1b7620f8723522ea680828e01e.zip |
Fix first turn collision
-rw-r--r-- | Scenes/Dungeon.gd | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Scenes/Dungeon.gd b/Scenes/Dungeon.gd index 35a1714..7247136 100644 --- a/Scenes/Dungeon.gd +++ b/Scenes/Dungeon.gd @@ -118,6 +118,7 @@ func process_turn_logic(): # player attack var cur_tile = entities_tiles[player] var new_tile = cur_tile + input + new_tile = new_tile.round() # simulate roll to attack player.roll(input) @@ -194,7 +195,7 @@ func _input(event): func move_entity(entity : Entity, dir : Vector2): var cur_tile = entities_tiles[entity] var new_tile = cur_tile + dir - new_tile = Vector2(round(new_tile.x), round(new_tile.y)) + new_tile = new_tile.round() if tiles_entities.has(new_tile): if entity.has_method("cor_shake"): |