game: add hp pickup
This commit is contained in:
@@ -39,6 +39,9 @@ func take_damage(value: float) -> void:
|
||||
if dead or god_mode:
|
||||
return
|
||||
player_stats.current_health -= value
|
||||
player_stats.current_health = clampf(
|
||||
player_stats.current_health, -1.0, player_stats.get_final("max_health", modifiers)
|
||||
)
|
||||
var dm = preload("res://scenes/damage_numbers.tscn").instantiate()
|
||||
dm.damage_taken = value
|
||||
dm.player_damage = false
|
||||
|
Reference in New Issue
Block a user