mirror of
https://port.numenaute.org/aleajactaest/khanat-client.git
synced 2024-11-22 07:06:14 +00:00
EDIT meilleur gestion de la douleur/oubli/trauma en concordance avec le wiki et changement des sliders du menu debug par des boutons.
This commit is contained in:
parent
d33896b009
commit
dd2ade1de0
8 changed files with 108 additions and 99 deletions
|
@ -2,9 +2,10 @@ extends WindowDialog
|
||||||
|
|
||||||
signal time_of_day_changed( value )
|
signal time_of_day_changed( value )
|
||||||
signal mist_level_changed( value )
|
signal mist_level_changed( value )
|
||||||
signal oubli_changed( value )
|
signal oubli_minus_pressed
|
||||||
signal douleur_changed( value )
|
signal oubli_plus_pressed
|
||||||
signal trauma_changed( value )
|
signal douleur_minus_pressed
|
||||||
|
signal douleur_plus_pressed
|
||||||
|
|
||||||
func _on_time_of_day_value_changed(value):
|
func _on_time_of_day_value_changed(value):
|
||||||
emit_signal( "time_of_day_changed", value )
|
emit_signal( "time_of_day_changed", value )
|
||||||
|
@ -14,19 +15,17 @@ func _on_mist_level_value_changed(value):
|
||||||
emit_signal( "mist_level_changed", value )
|
emit_signal( "mist_level_changed", value )
|
||||||
|
|
||||||
|
|
||||||
func _on_oubli_value_changed(value):
|
func _on_oubli_minus_pressed():
|
||||||
emit_signal( "oubli_changed", value )
|
emit_signal( "oubli_minus_pressed" )
|
||||||
|
|
||||||
|
|
||||||
func _on_douleur_value_changed(value):
|
func _on_oubli_plus_pressed():
|
||||||
emit_signal( "douleur_changed", value )
|
emit_signal( "oubli_plus_pressed" )
|
||||||
|
|
||||||
|
|
||||||
func _on_trauma_value_changed(value):
|
func _on_douleur_minus_pressed():
|
||||||
emit_signal( "trauma_changed", value )
|
emit_signal( "douleur_minus_pressed" )
|
||||||
|
|
||||||
|
|
||||||
func update_fears( oubli, douleur, trauma ):
|
func _on_douleur_plus_pressed():
|
||||||
$v_box_container/fears_box/oubli/value.value = oubli
|
emit_signal( "douleur_plus_pressed" )
|
||||||
$v_box_container/fears_box/douleur/value.value = douleur
|
|
||||||
$v_box_container/fears_box/trauma/value.value = trauma
|
|
||||||
|
|
|
@ -95,71 +95,59 @@ text = "Fears:"
|
||||||
[node name="fears_box" type="VBoxContainer" parent="v_box_container"]
|
[node name="fears_box" type="VBoxContainer" parent="v_box_container"]
|
||||||
margin_top = 94.0
|
margin_top = 94.0
|
||||||
margin_right = 256.0
|
margin_right = 256.0
|
||||||
margin_bottom = 150.0
|
margin_bottom = 138.0
|
||||||
|
|
||||||
[node name="oubli" type="HBoxContainer" parent="v_box_container/fears_box"]
|
[node name="oubli" type="HBoxContainer" parent="v_box_container/fears_box"]
|
||||||
margin_right = 256.0
|
margin_right = 256.0
|
||||||
margin_bottom = 16.0
|
margin_bottom = 20.0
|
||||||
|
|
||||||
[node name="label" type="Label" parent="v_box_container/fears_box/oubli"]
|
[node name="label" type="Label" parent="v_box_container/fears_box/oubli"]
|
||||||
margin_left = 91.0
|
margin_left = 160.0
|
||||||
margin_top = 1.0
|
margin_top = 3.0
|
||||||
margin_right = 126.0
|
margin_right = 195.0
|
||||||
margin_bottom = 15.0
|
margin_bottom = 17.0
|
||||||
size_flags_horizontal = 10
|
size_flags_horizontal = 10
|
||||||
text = "Oubli"
|
text = "Oubli"
|
||||||
|
|
||||||
[node name="value" type="HSlider" parent="v_box_container/fears_box/oubli"]
|
[node name="minus" type="Button" parent="v_box_container/fears_box/oubli"]
|
||||||
margin_left = 130.0
|
margin_left = 199.0
|
||||||
|
margin_right = 224.0
|
||||||
|
margin_bottom = 20.0
|
||||||
|
text = "-1"
|
||||||
|
|
||||||
|
[node name="plus" type="Button" parent="v_box_container/fears_box/oubli"]
|
||||||
|
margin_left = 228.0
|
||||||
margin_right = 256.0
|
margin_right = 256.0
|
||||||
margin_bottom = 16.0
|
margin_bottom = 20.0
|
||||||
size_flags_horizontal = 3
|
text = "+1"
|
||||||
max_value = 100.0
|
|
||||||
step = 0.1
|
|
||||||
|
|
||||||
[node name="douleur" type="HBoxContainer" parent="v_box_container/fears_box"]
|
[node name="douleur" type="HBoxContainer" parent="v_box_container/fears_box"]
|
||||||
margin_top = 20.0
|
margin_top = 24.0
|
||||||
margin_right = 256.0
|
margin_right = 256.0
|
||||||
margin_bottom = 36.0
|
margin_bottom = 44.0
|
||||||
|
|
||||||
[node name="label" type="Label" parent="v_box_container/fears_box/douleur"]
|
[node name="label" type="Label" parent="v_box_container/fears_box/douleur"]
|
||||||
margin_left = 75.0
|
margin_left = 144.0
|
||||||
margin_top = 1.0
|
margin_top = 3.0
|
||||||
margin_right = 126.0
|
margin_right = 195.0
|
||||||
margin_bottom = 15.0
|
margin_bottom = 17.0
|
||||||
size_flags_horizontal = 10
|
size_flags_horizontal = 10
|
||||||
text = "Douleur"
|
text = "Douleur"
|
||||||
|
|
||||||
[node name="value" type="HSlider" parent="v_box_container/fears_box/douleur"]
|
[node name="minus" type="Button" parent="v_box_container/fears_box/douleur"]
|
||||||
margin_left = 130.0
|
margin_left = 199.0
|
||||||
margin_right = 256.0
|
margin_right = 224.0
|
||||||
margin_bottom = 16.0
|
margin_bottom = 20.0
|
||||||
size_flags_horizontal = 3
|
text = "-1"
|
||||||
max_value = 100.0
|
|
||||||
step = 0.1
|
|
||||||
|
|
||||||
[node name="trauma" type="HBoxContainer" parent="v_box_container/fears_box"]
|
[node name="plus" type="Button" parent="v_box_container/fears_box/douleur"]
|
||||||
margin_top = 40.0
|
margin_left = 228.0
|
||||||
margin_right = 256.0
|
margin_right = 256.0
|
||||||
margin_bottom = 56.0
|
margin_bottom = 20.0
|
||||||
|
text = "+1"
|
||||||
[node name="label" type="Label" parent="v_box_container/fears_box/trauma"]
|
|
||||||
margin_left = 79.0
|
|
||||||
margin_top = 1.0
|
|
||||||
margin_right = 126.0
|
|
||||||
margin_bottom = 15.0
|
|
||||||
size_flags_horizontal = 10
|
|
||||||
text = "Trauma"
|
|
||||||
|
|
||||||
[node name="value" type="HSlider" parent="v_box_container/fears_box/trauma"]
|
|
||||||
margin_left = 130.0
|
|
||||||
margin_right = 256.0
|
|
||||||
margin_bottom = 16.0
|
|
||||||
size_flags_horizontal = 3
|
|
||||||
max_value = 100.0
|
|
||||||
step = 0.1
|
|
||||||
[connection signal="value_changed" from="v_box_container/sky_box/time_of_day/value" to="." method="_on_time_of_day_value_changed"]
|
[connection signal="value_changed" from="v_box_container/sky_box/time_of_day/value" to="." method="_on_time_of_day_value_changed"]
|
||||||
[connection signal="value_changed" from="v_box_container/mist_box/mist_level/value" to="." method="_on_mist_level_value_changed"]
|
[connection signal="value_changed" from="v_box_container/mist_box/mist_level/value" to="." method="_on_mist_level_value_changed"]
|
||||||
[connection signal="value_changed" from="v_box_container/fears_box/oubli/value" to="." method="_on_oubli_value_changed"]
|
[connection signal="pressed" from="v_box_container/fears_box/oubli/minus" to="." method="_on_oubli_minus_pressed"]
|
||||||
[connection signal="value_changed" from="v_box_container/fears_box/douleur/value" to="." method="_on_douleur_value_changed"]
|
[connection signal="pressed" from="v_box_container/fears_box/oubli/plus" to="." method="_on_oubli_plus_pressed"]
|
||||||
[connection signal="value_changed" from="v_box_container/fears_box/trauma/value" to="." method="_on_trauma_value_changed"]
|
[connection signal="pressed" from="v_box_container/fears_box/douleur/minus" to="." method="_on_douleur_minus_pressed"]
|
||||||
|
[connection signal="pressed" from="v_box_container/fears_box/douleur/plus" to="." method="_on_douleur_plus_pressed"]
|
||||||
|
|
30
scenes/decors/terrains/test/test_level.tscn
Normal file
30
scenes/decors/terrains/test/test_level.tscn
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
[gd_scene load_steps=3 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://scenes/decors/terrains/dunes/dunes.tscn" type="PackedScene" id=1]
|
||||||
|
[ext_resource path="res://scenes/decors/vegets/tree_001.tscn" type="PackedScene" id=2]
|
||||||
|
|
||||||
|
[node name="test_level" type="Spatial"]
|
||||||
|
transform = Transform( 10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0 )
|
||||||
|
|
||||||
|
[node name="dunes" parent="." instance=ExtResource( 1 )]
|
||||||
|
|
||||||
|
[node name="tree_001" parent="." instance=ExtResource( 2 )]
|
||||||
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 3.95473, 0, 1.44227 )
|
||||||
|
|
||||||
|
[node name="tree_006" parent="." instance=ExtResource( 2 )]
|
||||||
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -5.71715, 0, -3.36606 )
|
||||||
|
|
||||||
|
[node name="tree_007" parent="." instance=ExtResource( 2 )]
|
||||||
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 3.64162, 0, -6.91156 )
|
||||||
|
|
||||||
|
[node name="tree_002" parent="." instance=ExtResource( 2 )]
|
||||||
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -5.50864, 0, 4.49157 )
|
||||||
|
|
||||||
|
[node name="tree_003" parent="." instance=ExtResource( 2 )]
|
||||||
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -2.73244, -0.0038662, -7.54963 )
|
||||||
|
|
||||||
|
[node name="tree_004" parent="." instance=ExtResource( 2 )]
|
||||||
|
transform = Transform( 1, 0, 0, 0, 0.999688, 0.0249731, 0, -0.0249731, 0.999688, 7.26702, -0.568749, -9.67012 )
|
||||||
|
|
||||||
|
[node name="tree_005" parent="." instance=ExtResource( 2 )]
|
||||||
|
transform = Transform( 1, 0, 0, 0, 0.999688, 0.0249731, 0, -0.0249731, 0.999688, 7.26702, -0.568749, 9.23473 )
|
|
@ -44,20 +44,16 @@ func _on_debug_window_time_of_day_changed(value):
|
||||||
func _on_debug_window_mist_level_changed(value):
|
func _on_debug_window_mist_level_changed(value):
|
||||||
$mist_fx.get_surface_material( 0 ).set_shader_param( "mist_level", value )
|
$mist_fx.get_surface_material( 0 ).set_shader_param( "mist_level", value )
|
||||||
|
|
||||||
|
func _on_debug_window_douleur_minus_pressed():
|
||||||
|
$game_ui.change_douleur( -1 )
|
||||||
|
|
||||||
func _on_debug_window_douleur_changed(value):
|
func _on_debug_window_douleur_plus_pressed():
|
||||||
$game_ui.set_douleur( value )
|
$game_ui.change_douleur( 1 )
|
||||||
self.update_debug_fears()
|
|
||||||
|
|
||||||
func _on_debug_window_oubli_changed(value):
|
|
||||||
$game_ui.set_oubli( value )
|
|
||||||
self.update_debug_fears()
|
|
||||||
|
|
||||||
func _on_debug_window_trauma_changed(value):
|
|
||||||
$game_ui.set_trauma( value )
|
|
||||||
self.update_debug_fears()
|
|
||||||
|
|
||||||
func update_debug_fears():
|
|
||||||
$debug_window.update_fears( $game_ui/stats_window/oubli.value, $game_ui/stats_window/douleur.value, $game_ui/stats_window/trauma.value )
|
|
||||||
|
|
||||||
|
|
||||||
|
func _on_debug_window_oubli_minus_pressed():
|
||||||
|
$game_ui.change_oubli( -1 )
|
||||||
|
|
||||||
|
|
||||||
|
func _on_debug_window_oubli_plus_pressed():
|
||||||
|
$game_ui.change_oubli( 1 )
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
[gd_scene load_steps=21 format=2]
|
[gd_scene load_steps=20 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://scenes/player/player.tscn" type="PackedScene" id=1]
|
[ext_resource path="res://scenes/player/player.tscn" type="PackedScene" id=1]
|
||||||
[ext_resource path="res://scenes/decors/terrains/dunes/dunes.tscn" type="PackedScene" id=2]
|
|
||||||
[ext_resource path="res://scenes/game/game.gd" type="Script" id=3]
|
[ext_resource path="res://scenes/game/game.gd" type="Script" id=3]
|
||||||
[ext_resource path="res://scenes/decors/vegets/tree_001.tscn" type="PackedScene" id=4]
|
|
||||||
[ext_resource path="res://assets/sky/sky.shader" type="Shader" id=5]
|
[ext_resource path="res://assets/sky/sky.shader" type="Shader" id=5]
|
||||||
[ext_resource path="res://scenes/game/sky.gd" type="Script" id=6]
|
[ext_resource path="res://scenes/game/sky.gd" type="Script" id=6]
|
||||||
[ext_resource path="res://assets/mist/mist.shader" type="Shader" id=7]
|
[ext_resource path="res://assets/mist/mist.shader" type="Shader" id=7]
|
||||||
|
@ -11,6 +9,7 @@
|
||||||
[ext_resource path="res://assets/interfaces/themes/khanat_theme.theme" type="Theme" id=9]
|
[ext_resource path="res://assets/interfaces/themes/khanat_theme.theme" type="Theme" id=9]
|
||||||
[ext_resource path="res://assets/interfaces/buttons/close_icon.png" type="Texture" id=10]
|
[ext_resource path="res://assets/interfaces/buttons/close_icon.png" type="Texture" id=10]
|
||||||
[ext_resource path="res://scenes/interfaces/game_menu/game_ui.tscn" type="PackedScene" id=11]
|
[ext_resource path="res://scenes/interfaces/game_menu/game_ui.tscn" type="PackedScene" id=11]
|
||||||
|
[ext_resource path="res://scenes/decors/terrains/test/test_level.tscn" type="PackedScene" id=12]
|
||||||
|
|
||||||
[sub_resource type="OpenSimplexNoise" id=1]
|
[sub_resource type="OpenSimplexNoise" id=1]
|
||||||
period = 8.0
|
period = 8.0
|
||||||
|
@ -25,8 +24,8 @@ noise = SubResource( 1 )
|
||||||
[sub_resource type="ShaderMaterial" id=3]
|
[sub_resource type="ShaderMaterial" id=3]
|
||||||
resource_local_to_scene = true
|
resource_local_to_scene = true
|
||||||
shader = ExtResource( 5 )
|
shader = ExtResource( 5 )
|
||||||
shader_param/iTime = 84.4711
|
shader_param/iTime = 4.40622
|
||||||
shader_param/iFrame = 4977
|
shader_param/iFrame = 250
|
||||||
shader_param/COVERAGE = 0.5
|
shader_param/COVERAGE = 0.5
|
||||||
shader_param/THICKNESS = 25.0
|
shader_param/THICKNESS = 25.0
|
||||||
shader_param/ABSORPTION = 1.031
|
shader_param/ABSORPTION = 1.031
|
||||||
|
@ -105,11 +104,7 @@ environment = SubResource( 7 )
|
||||||
|
|
||||||
[node name="level" type="Spatial" parent="."]
|
[node name="level" type="Spatial" parent="."]
|
||||||
|
|
||||||
[node name="dunes" parent="level" instance=ExtResource( 2 )]
|
[node name="test_level" parent="level" instance=ExtResource( 12 )]
|
||||||
transform = Transform( 10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0 )
|
|
||||||
|
|
||||||
[node name="tree_001" parent="level" instance=ExtResource( 4 )]
|
|
||||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -11.2768, 8, 13.9512 )
|
|
||||||
|
|
||||||
[node name="creatures" type="Spatial" parent="."]
|
[node name="creatures" type="Spatial" parent="."]
|
||||||
|
|
||||||
|
@ -125,15 +120,15 @@ material/0 = SubResource( 9 )
|
||||||
[node name="game_ui" parent="." instance=ExtResource( 11 )]
|
[node name="game_ui" parent="." instance=ExtResource( 11 )]
|
||||||
|
|
||||||
[node name="debug_window" parent="." instance=ExtResource( 8 )]
|
[node name="debug_window" parent="." instance=ExtResource( 8 )]
|
||||||
visible = true
|
|
||||||
margin_left = 972.873
|
margin_left = 972.873
|
||||||
margin_top = 52.3552
|
margin_top = 52.3552
|
||||||
margin_right = -51.1268
|
margin_right = -51.1268
|
||||||
margin_bottom = -411.645
|
margin_bottom = -411.645
|
||||||
theme = ExtResource( 9 )
|
theme = ExtResource( 9 )
|
||||||
custom_icons/close = ExtResource( 10 )
|
custom_icons/close = ExtResource( 10 )
|
||||||
[connection signal="douleur_changed" from="debug_window" to="." method="_on_debug_window_douleur_changed"]
|
[connection signal="douleur_minus_pressed" from="debug_window" to="." method="_on_debug_window_douleur_minus_pressed"]
|
||||||
|
[connection signal="douleur_plus_pressed" from="debug_window" to="." method="_on_debug_window_douleur_plus_pressed"]
|
||||||
[connection signal="mist_level_changed" from="debug_window" to="." method="_on_debug_window_mist_level_changed"]
|
[connection signal="mist_level_changed" from="debug_window" to="." method="_on_debug_window_mist_level_changed"]
|
||||||
[connection signal="oubli_changed" from="debug_window" to="." method="_on_debug_window_oubli_changed"]
|
[connection signal="oubli_minus_pressed" from="debug_window" to="." method="_on_debug_window_oubli_minus_pressed"]
|
||||||
|
[connection signal="oubli_plus_pressed" from="debug_window" to="." method="_on_debug_window_oubli_plus_pressed"]
|
||||||
[connection signal="time_of_day_changed" from="debug_window" to="." method="_on_debug_window_time_of_day_changed"]
|
[connection signal="time_of_day_changed" from="debug_window" to="." method="_on_debug_window_time_of_day_changed"]
|
||||||
[connection signal="trauma_changed" from="debug_window" to="." method="_on_debug_window_trauma_changed"]
|
|
||||||
|
|
|
@ -30,12 +30,12 @@ __meta__ = {
|
||||||
[node name="douleur" type="TextureProgress" parent="stats_window"]
|
[node name="douleur" type="TextureProgress" parent="stats_window"]
|
||||||
margin_right = 126.0
|
margin_right = 126.0
|
||||||
margin_bottom = 126.0
|
margin_bottom = 126.0
|
||||||
max_value = 100.0
|
max_value = 18.0
|
||||||
step = 0.1
|
step = 0.5
|
||||||
texture_progress = ExtResource( 3 )
|
texture_progress = ExtResource( 3 )
|
||||||
fill_mode = 4
|
fill_mode = 4
|
||||||
tint_progress = Color( 1, 0, 0, 1 )
|
tint_progress = Color( 1, 0, 0, 1 )
|
||||||
radial_fill_degrees = 112.0
|
radial_fill_degrees = 135.0
|
||||||
__meta__ = {
|
__meta__ = {
|
||||||
"_edit_use_anchors_": false
|
"_edit_use_anchors_": false
|
||||||
}
|
}
|
||||||
|
@ -43,12 +43,12 @@ __meta__ = {
|
||||||
[node name="oubli" type="TextureProgress" parent="stats_window"]
|
[node name="oubli" type="TextureProgress" parent="stats_window"]
|
||||||
margin_right = 126.0
|
margin_right = 126.0
|
||||||
margin_bottom = 126.0
|
margin_bottom = 126.0
|
||||||
max_value = 100.0
|
max_value = 18.0
|
||||||
step = 0.1
|
step = 0.5
|
||||||
texture_progress = ExtResource( 3 )
|
texture_progress = ExtResource( 3 )
|
||||||
fill_mode = 5
|
fill_mode = 5
|
||||||
tint_progress = Color( 0, 1, 0, 1 )
|
tint_progress = Color( 0, 1, 0, 1 )
|
||||||
radial_fill_degrees = 112.0
|
radial_fill_degrees = 135.0
|
||||||
__meta__ = {
|
__meta__ = {
|
||||||
"_edit_use_anchors_": false
|
"_edit_use_anchors_": false
|
||||||
}
|
}
|
||||||
|
@ -56,12 +56,13 @@ __meta__ = {
|
||||||
[node name="trauma" type="TextureProgress" parent="stats_window"]
|
[node name="trauma" type="TextureProgress" parent="stats_window"]
|
||||||
margin_right = 126.0
|
margin_right = 126.0
|
||||||
margin_bottom = 126.0
|
margin_bottom = 126.0
|
||||||
step = 0.1
|
max_value = 6.0
|
||||||
|
step = 0.5
|
||||||
texture_progress = ExtResource( 3 )
|
texture_progress = ExtResource( 3 )
|
||||||
fill_mode = 8
|
fill_mode = 8
|
||||||
tint_progress = Color( 0, 0, 1, 1 )
|
tint_progress = Color( 0, 0, 1, 1 )
|
||||||
radial_initial_angle = 180.0
|
radial_initial_angle = 180.0
|
||||||
radial_fill_degrees = 135.0
|
radial_fill_degrees = 90.0
|
||||||
__meta__ = {
|
__meta__ = {
|
||||||
"_edit_use_anchors_": false
|
"_edit_use_anchors_": false
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,13 +17,13 @@ func update_trauma():
|
||||||
$trauma.value = ($oubli.value+$douleur.value)/2
|
$trauma.value = ($oubli.value+$douleur.value)/2
|
||||||
|
|
||||||
func _on_douleur_value_changed(value):
|
func _on_douleur_value_changed(value):
|
||||||
$douleur.self_modulate.a = (value / 100.0) * (value / 100.0)
|
$douleur.self_modulate.a = (value / 18.0) * (value / 18.0)
|
||||||
self.update_trauma()
|
self.update_trauma()
|
||||||
|
|
||||||
func _on_oubli_value_changed(value):
|
func _on_oubli_value_changed(value):
|
||||||
$oubli.self_modulate.a = (value / 100.0) * (value / 100.0)
|
$oubli.self_modulate.a = (value / 18.0) * (value / 18.0)
|
||||||
self.update_trauma()
|
self.update_trauma()
|
||||||
|
|
||||||
|
|
||||||
func _on_trauma_value_changed(value):
|
func _on_trauma_value_changed(value):
|
||||||
$trauma.self_modulate.a = (value / 100.0) * (value / 100.0)
|
$trauma.self_modulate.a = (value / 6.0) * (value / 6.0)
|
||||||
|
|
Loading…
Reference in a new issue