diff options
author | Victor Andrade de Almeida <vct.a.almeida@gmail.com> | 2022-07-17 14:17:53 -0300 |
---|---|---|
committer | Victor Andrade de Almeida <vct.a.almeida@gmail.com> | 2022-07-17 14:18:05 -0300 |
commit | ca8f5b86ea94328a755a1a181ee5a0a6736c6536 (patch) | |
tree | 4d43cfb093c347d288ed91de6f7fc4841b022aac /Scenes/Dungeon.gd | |
parent | 2514718e386d2210c374bc42fbab704c535b9a83 (diff) | |
download | gamejam-gmtk-2022-ca8f5b86ea94328a755a1a181ee5a0a6736c6536.tar.gz gamejam-gmtk-2022-ca8f5b86ea94328a755a1a181ee5a0a6736c6536.tar.bz2 gamejam-gmtk-2022-ca8f5b86ea94328a755a1a181ee5a0a6736c6536.zip |
Add damage label
Diffstat (limited to 'Scenes/Dungeon.gd')
-rw-r--r-- | Scenes/Dungeon.gd | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Scenes/Dungeon.gd b/Scenes/Dungeon.gd index fd329e6..c9df4a2 100644 --- a/Scenes/Dungeon.gd +++ b/Scenes/Dungeon.gd @@ -74,6 +74,9 @@ func kill_entity(entity): tiles_entities.erase(tile) entities_tiles.erase(entity) +func damage_player(damage): + ui_controller.on_damaged(damage, player.translation) + func build_floor(): player = Player.instance() camera.follow(player) @@ -150,6 +153,7 @@ func process_turn_logic(): pass Monster.MonsterActionType.ATTACK: player.add_action("cor_damage", [0.2]) + damage_player(1) Global.turns -= 1 Monster.MonsterActionType.MOVE: move_entity(monster, monster_action.dir) |