Health bar adjustments
This commit is contained in:
@ -63,5 +63,12 @@ func set_character_data():
|
||||
|
||||
func adjust_health_bar() -> void:
|
||||
var health_bar = get_node("ProgressBar")
|
||||
health_bar.value = health / current_health * 100
|
||||
if current_shield > 0:
|
||||
health_bar.get("theme_override_styles/fill").bg_color = Color(0,0,1)
|
||||
health_bar.get("theme_override_styles/background").bg_color = Color(0,1,0)
|
||||
health_bar.value = shield / current_shield * 100
|
||||
else:
|
||||
health_bar.get("theme_override_styles/fill").bg_color = Color(0,1,0)
|
||||
health_bar.get("theme_override_styles/background").bg_color = Color(1,0,0)
|
||||
health_bar.value = health / current_health * 100
|
||||
pass
|
||||
|
Reference in New Issue
Block a user