test-client-godot/gui_scene/GUI/HUD/douleur.gd

10 lines
269 B
GDScript3
Raw Permalink Normal View History

extends HBoxContainer
func _process(delta):
self.get_node( "ProgressBar" ).value = character.douleur
func _on_ProgressBar_value_changed(value):
self.modulate.a = clamp(value/50, 0.4, 1 )
get_node( "../../overlay_douleur" ).modulate.a = self.modulate.a/2