ajout d'un effet quand les jauges de douleur et d'oubli augmentent.

This commit is contained in:
osquallo 2018-07-27 12:13:08 +02:00
parent c6264c0e49
commit 83133524f6
2 changed files with 28 additions and 13 deletions

View file

@ -31,7 +31,24 @@ custom_constants/margin_bottom = 0
script = ExtResource( 1 )
_sections_unfolded = [ "Margin", "Mouse", "Rect", "Size Flags", "Theme", "Visibility", "custom_constants" ]
[node name="overlay_douleur" type="Panel" parent="." index="0"]
[node name="overlay_oubli" type="Panel" parent="." index="0"]
modulate = Color( 0, 0, 0, 0 )
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_right = 1024.0
margin_bottom = 600.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 0
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 1
_sections_unfolded = [ "Visibility" ]
[node name="overlay_douleur" type="Panel" parent="." index="1"]
modulate = Color( 1, 0, 0, 0 )
anchor_left = 0.0
@ -48,7 +65,7 @@ size_flags_horizontal = 1
size_flags_vertical = 1
_sections_unfolded = [ "Visibility" ]
[node name="Windows" type="ReferenceRect" parent="." index="1"]
[node name="Windows" type="ReferenceRect" parent="." index="2"]
editor/display_folded = true
anchor_left = 0.0
@ -1070,7 +1087,7 @@ group = null
texture_normal = ExtResource( 7 )
_sections_unfolded = [ "Mouse", "Size Flags", "Textures" ]
[node name="Music" parent="." index="2" instance=ExtResource( 8 )]
[node name="Music" parent="." index="3" instance=ExtResource( 8 )]
margin_left = 942.0
margin_top = 0.0
@ -1080,7 +1097,7 @@ size_flags_horizontal = 8
size_flags_vertical = 2
_sections_unfolded = [ "Size Flags" ]
[node name="Jauges" type="VBoxContainer" parent="." index="3"]
[node name="Jauges" type="VBoxContainer" parent="." index="4"]
anchor_left = 0.0
anchor_top = 0.0
@ -1101,7 +1118,6 @@ _sections_unfolded = [ "Size Flags" ]
[node name="oubli" type="HBoxContainer" parent="Jauges" index="0"]
editor/display_folded = true
modulate = Color( 1, 1, 1, 0 )
anchor_left = 0.0
anchor_top = 0.0
@ -1141,8 +1157,8 @@ page = 0.0
value = 0.0
exp_edit = false
rounded = false
percent_visible = true
_sections_unfolded = [ "Percent", "Rect", "Size Flags" ]
percent_visible = false
_sections_unfolded = [ "Material", "Percent", "Rect", "Size Flags" ]
[node name="Label" type="Label" parent="Jauges/oubli" index="1"]
@ -1167,7 +1183,6 @@ max_lines_visible = -1
[node name="trauma" type="HBoxContainer" parent="Jauges" index="1"]
editor/display_folded = true
modulate = Color( 1, 1, 1, 0 )
anchor_left = 0.0
anchor_top = 0.0
@ -1208,7 +1223,7 @@ page = 0.0
value = 0.0
exp_edit = false
rounded = false
percent_visible = true
percent_visible = false
_sections_unfolded = [ "Percent", "Rect", "Size Flags" ]
[node name="Label" type="Label" parent="Jauges/trauma" index="1"]
@ -1234,7 +1249,6 @@ max_lines_visible = -1
[node name="douleur" type="HBoxContainer" parent="Jauges" index="2"]
editor/display_folded = true
modulate = Color( 1, 1, 1, 0 )
anchor_left = 0.0
anchor_top = 0.0
@ -1275,7 +1289,7 @@ page = 0.0
value = 0.0
exp_edit = false
rounded = false
percent_visible = true
percent_visible = false
_sections_unfolded = [ "Percent", "Rect", "Size Flags" ]
[node name="Label" type="Label" parent="Jauges/douleur" index="1"]
@ -1299,7 +1313,7 @@ percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1
[node name="SaveHUD" type="Button" parent="." index="4"]
[node name="SaveHUD" type="Button" parent="." index="5"]
anchor_left = 0.0
anchor_top = 0.0

View file

@ -16,4 +16,5 @@ func _ready():
func _on_ProgressBar_value_changed(value):
self.modulate = Color( 1.0, 1.0, 1.0, clamp(value/50, 20/255, 1 ) )
self.modulate = Color( 1.0, 1.0, 1.0, clamp(value/50, 20/255, 1 ) )
get_node( "../../overlay_oubli" ).modulate.a = self.modulate.a-self.modulate.a/2