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

10 lines
269 B
GDScript3
Raw Normal View History

extends HBoxContainer
2018-08-18 08:22:19 +00:00
func _process(delta):
self.get_node( "ProgressBar" ).value = character.douleur
func _on_ProgressBar_value_changed(value):
2018-08-18 08:22:19 +00:00
self.modulate.a = clamp(value/50, 0.4, 1 )
get_node( "../../overlay_douleur" ).modulate.a = self.modulate.a/2