godot-shooter / commit
Fix issue where enemies were only taking 1 HP from player on collisions. Made the shooting slower.
Player.gd | 2 +- Player.tscn | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Player.gd b/Player.gd index b7aeab2..c2751f7 100644 --- a/Player.gd +++ b/Player.gd @@ -61,7 +61,7 @@ func kill(): func hurt(damage_amount: int = 1): if dead: return - health -= 1 + health -= damage_amount if health <= 0: kill() diff --git a/Player.tscn b/Player.tscn index 7f1f864..037117f 100644 --- a/Player.tscn +++ b/Player.tscn @@ -90,7 +90,7 @@ margin_bottom = -2.0 color = Color( 0.811765, 0, 0, 1 ) [node name="ShotTimer" type="Timer" parent="."] -wait_time = 0.2 +wait_time = 0.5 autostart = true [node name="Barrel" type="Position2D" parent="."]