chore: run gdformat
This commit is contained in:
@@ -43,7 +43,9 @@ func take_damage(value: float) -> void:
|
||||
dm.damage_taken = value
|
||||
dm.player_damage = false
|
||||
add_child(dm)
|
||||
main_ui.player_ui.set_hp((player_stats.current_health / player_stats.get_final("max_health", modifiers)) * 100)
|
||||
main_ui.player_ui.set_hp(
|
||||
(player_stats.current_health / player_stats.get_final("max_health", modifiers)) * 100
|
||||
)
|
||||
if player_stats.current_health <= 0:
|
||||
die()
|
||||
|
||||
@@ -85,10 +87,12 @@ func get_taunted():
|
||||
func toggle_god_mode(value: bool):
|
||||
god_mode = value
|
||||
|
||||
|
||||
func add_xp(amount: float) -> void:
|
||||
player_stats.current_xp += amount
|
||||
_check_level_up()
|
||||
|
||||
|
||||
func _check_level_up() -> void:
|
||||
var required_for_level = 25.0
|
||||
if player_stats.current_xp >= required_for_level:
|
||||
@@ -96,6 +100,7 @@ func _check_level_up() -> void:
|
||||
player_stats.current_xp -= required_for_level
|
||||
_trigger_level_up()
|
||||
|
||||
|
||||
func _trigger_level_up() -> void:
|
||||
var choice_count = 3
|
||||
var choices: Array[LevelUpChoice] = []
|
||||
@@ -110,6 +115,7 @@ func _trigger_level_up() -> void:
|
||||
Engine.time_scale = 0.0
|
||||
main_ui.level_up_ui.visible = true
|
||||
|
||||
|
||||
func _on_pickup_area_area_entered(area: Area2D) -> void:
|
||||
var body: Node2D = area.get_parent()
|
||||
if body.is_in_group(GlobalConst.GROUP_XP_ORB):
|
||||
|
Reference in New Issue
Block a user