mirror of
https://github.com/Relintai/broken_seals.git
synced 2024-11-10 08:42:11 +01:00
Fix initial value for the nameplates.
This commit is contained in:
parent
e1219b26f1
commit
3ad461adb5
@ -123,11 +123,11 @@ func set_max_distance(var value : float) -> void:
|
||||
max_distance = value
|
||||
|
||||
func c_health_changed(stat : EntityResource) -> void:
|
||||
if stat.current_value != 0:
|
||||
health_bar.max_value = stat.max_value
|
||||
else:
|
||||
if stat.max_value == 0:
|
||||
health_bar.max_value = 1
|
||||
health_bar.value = 0
|
||||
|
||||
health_bar.max_value = stat.max_value
|
||||
health_bar.value = stat.current_value
|
||||
|
||||
|
||||
@ -173,3 +173,4 @@ func on_centity_resource_added(resorce) -> void:
|
||||
|
||||
health = entity.getc_health()
|
||||
health.connect("changed", self, "c_health_changed")
|
||||
c_health_changed(health)
|
||||
|
@ -41,7 +41,7 @@ margin_right = 62.0
|
||||
margin_bottom = 2.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
value = 50.0
|
||||
value = 100.0
|
||||
texture_under = ExtResource( 2 )
|
||||
texture_progress = ExtResource( 2 )
|
||||
tint_under = Color( 0.219608, 0.215686, 0.215686, 0.756863 )
|
||||
|
Loading…
Reference in New Issue
Block a user