Dev demo 1.2
* Ajout d'un paramètre de FOV * Ajout d'un paramètre d'auto pickup des graines
This commit is contained in:
@@ -9,6 +9,7 @@ signal language_changed(settings : SettingsData)
|
||||
signal sound_changed(settings : SettingsData)
|
||||
signal video_changed(settings : SettingsData)
|
||||
signal game_changed(settings : SettingsData)
|
||||
signal fov_changed(value : float)
|
||||
|
||||
#region ------------------ Language ------------------
|
||||
|
||||
@@ -52,9 +53,19 @@ const AVAILABLE_LANGUAGES_LABEL = [
|
||||
|
||||
#region ------------------ Controls ------------------
|
||||
|
||||
|
||||
|
||||
@export var action_remapped : Array[String] = []
|
||||
@export var input_remapped : Array[InputEvent] = []
|
||||
|
||||
@export var auto_pickup := true
|
||||
|
||||
@export var fov := 75. :
|
||||
set(v):
|
||||
fov = v
|
||||
fov_changed.emit(fov)
|
||||
|
||||
|
||||
#region ------------------ Game ------------------
|
||||
|
||||
const MAX_ZOOM = 2.
|
||||
|
||||
@@ -114,7 +114,8 @@ func _process(delta):
|
||||
if elapsed_time > last_just_dropped_item_objects_updated + JUST_DROPPED_ITEM_UPDATE_INTERVAL:
|
||||
update_just_dropped_item_objects()
|
||||
|
||||
take_surrounding_seeds()
|
||||
if GameInfo.settings_data.auto_pickup:
|
||||
take_surrounding_seeds()
|
||||
|
||||
move_and_slide()
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ current = true
|
||||
near = 0.003
|
||||
|
||||
[node name="Outline" type="MeshInstance3D" parent="Camera3D" unique_id=1477584785]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.9337665e-08, 0, -0.87116754)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.96128e-09, 0, -0.24486887)
|
||||
mesh = SubResource("QuadMesh_o44vi")
|
||||
surface_material_override/0 = ExtResource("2_fcmrk")
|
||||
|
||||
|
||||
@@ -32,6 +32,11 @@ func _ready():
|
||||
|
||||
%MoveTutorial.visible = not "3d_move" in GameInfo.game_data.tutorials_done
|
||||
%InteractTutorial.visible = false
|
||||
%Camera3D.fov = GameInfo.settings_data.fov
|
||||
GameInfo.settings_data.fov_changed.connect(
|
||||
func(fov : float):
|
||||
%Camera3D.fov = fov
|
||||
)
|
||||
|
||||
func _input(event):
|
||||
if controlling_player:
|
||||
|
||||
@@ -16,7 +16,7 @@ script = ExtResource("1_g86te")
|
||||
|
||||
[node name="ControlsWindow" parent="." unique_id=257725506 instance=ExtResource("1_mnd1d")]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(900, 500)
|
||||
custom_minimum_size = Vector2(900, 600)
|
||||
layout_mode = 1
|
||||
title = "CONTROLS"
|
||||
|
||||
|
||||
@@ -7,8 +7,11 @@ const INPUT_GROUP_SCENE = preload("res://gui/menu/controls/input_group.tscn")
|
||||
|
||||
func _ready():
|
||||
create_input_list()
|
||||
if not Engine.is_editor_hint():
|
||||
%ControlsWindow.close_window()
|
||||
%ControlsWindow.hide()
|
||||
%ControlsWindow.closed.connect(
|
||||
func ():
|
||||
GameInfo.save_settings()
|
||||
)
|
||||
|
||||
func open_controls():
|
||||
create_input_list()
|
||||
|
||||
@@ -8,57 +8,72 @@ class_name GuiSettings
|
||||
@export_tool_button("Close", "Callable") var close_action = close_settings
|
||||
|
||||
func _ready():
|
||||
setup_languages()
|
||||
setup_sound()
|
||||
setup_video()
|
||||
show()
|
||||
if not Engine.is_editor_hint():
|
||||
%SettingsWindow.close_window()
|
||||
setup_languages()
|
||||
setup_sound()
|
||||
setup_video()
|
||||
setup_controls()
|
||||
show()
|
||||
%SettingsWindow.hide()
|
||||
%SettingsWindow.closed.connect(
|
||||
func():
|
||||
GameInfo.save_settings()
|
||||
)
|
||||
|
||||
func open_settings():
|
||||
setup_languages()
|
||||
setup_sound()
|
||||
setup_video()
|
||||
show()
|
||||
%SettingsWindow.open_window()
|
||||
setup_languages()
|
||||
setup_sound()
|
||||
setup_controls()
|
||||
show()
|
||||
%SettingsWindow.open_window()
|
||||
|
||||
func close_settings():
|
||||
GameInfo.save_settings()
|
||||
%SettingsWindow.close_window()
|
||||
GameInfo.save_settings()
|
||||
%SettingsWindow.close_window()
|
||||
|
||||
func setup_languages():
|
||||
var optionButton := (%LanguageOptionButton as OptionButton)
|
||||
optionButton.clear()
|
||||
for language in SettingsData.AVAILABLE_LANGUAGES_LABEL:
|
||||
optionButton.add_item(language)
|
||||
optionButton.selected = SettingsData.AVAILABLE_LANGUAGES.find(settings.language)
|
||||
var optionButton := (%LanguageOptionButton as OptionButton)
|
||||
optionButton.clear()
|
||||
for language in SettingsData.AVAILABLE_LANGUAGES_LABEL:
|
||||
optionButton.add_item(language)
|
||||
optionButton.selected = SettingsData.AVAILABLE_LANGUAGES.find(settings.language)
|
||||
|
||||
func setup_sound():
|
||||
%MusicSlider.value = settings.music_volume
|
||||
%EnvSlider.value = settings.ambiance_volume
|
||||
%SFXSlider.value = settings.sfx_volume
|
||||
%MusicSlider.value = settings.music_volume
|
||||
%EnvSlider.value = settings.ambiance_volume
|
||||
%SFXSlider.value = settings.sfx_volume
|
||||
|
||||
func setup_video():
|
||||
%FullScreenCheckBox.button_pressed = settings.full_screen
|
||||
%FullScreenCheckBox.button_pressed = settings.full_screen
|
||||
|
||||
func setup_controls():
|
||||
%AutoPickupCheckBox.button_pressed = settings.auto_pickup
|
||||
%FovSlider.value = settings.fov
|
||||
|
||||
func _on_language_option_button_item_selected(index: int):
|
||||
settings.language = SettingsData.AVAILABLE_LANGUAGES[index]
|
||||
settings.language = SettingsData.AVAILABLE_LANGUAGES[index]
|
||||
|
||||
|
||||
func _on_full_screen_check_box_toggled(toggled_on: bool):
|
||||
settings.full_screen = toggled_on
|
||||
settings.full_screen = toggled_on
|
||||
|
||||
func _on_music_slider_value_changed(value: float):
|
||||
if value != settings.music_volume:
|
||||
%MusicTestPlayer.play()
|
||||
settings.music_volume = min(1.0, value)
|
||||
if value != settings.music_volume:
|
||||
%MusicTestPlayer.play()
|
||||
settings.music_volume = min(1.0, value)
|
||||
|
||||
func _on_env_slider_value_changed(value: float):
|
||||
if value != settings.ambiance_volume:
|
||||
%AudioStreamPlayer.play()
|
||||
settings.ambiance_volume = min(1.0, value)
|
||||
if value != settings.ambiance_volume:
|
||||
%AudioStreamPlayer.play()
|
||||
settings.ambiance_volume = min(1.0, value)
|
||||
|
||||
func _on_sfx_slider_value_changed(value: float):
|
||||
if value != settings.sfx_volume:
|
||||
%SfxTestPlayer.play()
|
||||
settings.sfx_volume = min(1.0, value)
|
||||
if value != settings.sfx_volume:
|
||||
%SfxTestPlayer.play()
|
||||
settings.sfx_volume = min(1.0, value)
|
||||
|
||||
func _on_auto_pickup_check_box_toggled(toggled_on: bool):
|
||||
settings.auto_pickup = toggled_on
|
||||
|
||||
func _on_fov_slider_value_changed(value):
|
||||
if is_node_ready():
|
||||
settings.fov = value
|
||||
|
||||
@@ -23,6 +23,7 @@ script = ExtResource("1_7t8mv")
|
||||
[node name="SettingsWindow" parent="." unique_id=798514856 instance=ExtResource("1_gkn1k")]
|
||||
unique_name_in_owner = true
|
||||
process_mode = 3
|
||||
custom_minimum_size = Vector2(700, 600)
|
||||
layout_mode = 1
|
||||
offset_left = -349.99994
|
||||
offset_right = 350.00055
|
||||
@@ -131,6 +132,40 @@ size_flags_horizontal = 10
|
||||
size_flags_vertical = 4
|
||||
theme = ExtResource("2_7t8mv")
|
||||
|
||||
[node name="FovSliderText" parent="SettingsWindow/WindowContent/MarginContainer/ContentContainer/MarginContainer/SettingsContent/VideoSettings" unique_id=1512796885 instance=ExtResource("4_rbiwc")]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "FOV"
|
||||
|
||||
[node name="FovSlider" type="HSlider" parent="SettingsWindow/WindowContent/MarginContainer/ContentContainer/MarginContainer/SettingsContent/VideoSettings" unique_id=1863124478]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
theme = ExtResource("2_7t8mv")
|
||||
min_value = 25.0
|
||||
max_value = 150.0
|
||||
value = 25.0
|
||||
|
||||
[node name="GameTitle" parent="SettingsWindow/WindowContent/MarginContainer/ContentContainer/MarginContainer/SettingsContent" unique_id=1070654753 instance=ExtResource("3_rbiwc")]
|
||||
layout_mode = 2
|
||||
title = "GAME"
|
||||
|
||||
[node name="GameSettings" type="GridContainer" parent="SettingsWindow/WindowContent/MarginContainer/ContentContainer/MarginContainer/SettingsContent" unique_id=51915883]
|
||||
layout_mode = 2
|
||||
columns = 2
|
||||
|
||||
[node name="AutoPickupText" parent="SettingsWindow/WindowContent/MarginContainer/ContentContainer/MarginContainer/SettingsContent/GameSettings" unique_id=1206884739 instance=ExtResource("4_rbiwc")]
|
||||
layout_mode = 2
|
||||
text = "AUTO_PICKUP"
|
||||
|
||||
[node name="AutoPickupCheckBox" type="CheckBox" parent="SettingsWindow/WindowContent/MarginContainer/ContentContainer/MarginContainer/SettingsContent/GameSettings" unique_id=679739606]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 10
|
||||
size_flags_vertical = 4
|
||||
theme = ExtResource("2_7t8mv")
|
||||
|
||||
[node name="MusicTestPlayer" type="AudioStreamPlayer" parent="." unique_id=1716804039]
|
||||
unique_name_in_owner = true
|
||||
stream = ExtResource("6_8f00b")
|
||||
@@ -151,5 +186,7 @@ bus = &"Sfx"
|
||||
[connection signal="value_changed" from="SettingsWindow/WindowContent/MarginContainer/ContentContainer/MarginContainer/SettingsContent/SoundSliders/EnvSlider" to="." method="_on_env_slider_value_changed"]
|
||||
[connection signal="value_changed" from="SettingsWindow/WindowContent/MarginContainer/ContentContainer/MarginContainer/SettingsContent/SoundSliders/SFXSlider" to="." method="_on_sfx_slider_value_changed"]
|
||||
[connection signal="toggled" from="SettingsWindow/WindowContent/MarginContainer/ContentContainer/MarginContainer/SettingsContent/VideoSettings/FullScreenCheckBox" to="." method="_on_full_screen_check_box_toggled"]
|
||||
[connection signal="value_changed" from="SettingsWindow/WindowContent/MarginContainer/ContentContainer/MarginContainer/SettingsContent/VideoSettings/FovSlider" to="." method="_on_fov_slider_value_changed"]
|
||||
[connection signal="toggled" from="SettingsWindow/WindowContent/MarginContainer/ContentContainer/MarginContainer/SettingsContent/GameSettings/AutoPickupCheckBox" to="." method="_on_auto_pickup_check_box_toggled"]
|
||||
|
||||
[editable path="SettingsWindow"]
|
||||
|
||||
@@ -24,7 +24,8 @@ func open_window():
|
||||
%ControlAnimationPlayer.appear()
|
||||
|
||||
func close_window():
|
||||
%ControlAnimationPlayer.disappear(0.3)
|
||||
await get_tree().create_timer(0.3).timeout
|
||||
hide()
|
||||
if visible:
|
||||
%ControlAnimationPlayer.disappear(0.3)
|
||||
await get_tree().create_timer(0.3).timeout
|
||||
hide()
|
||||
closed.emit()
|
||||
|
||||
@@ -103,7 +103,7 @@ anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
color = Color(0.036075003, 0.019499997, 0.13, 0.98039216)
|
||||
color = Color(0.036075003, 0.019499997, 0.13, 0.78431374)
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="Container" unique_id=243001225]
|
||||
layout_mode = 1
|
||||
|
||||
@@ -16,7 +16,7 @@ compatibility/default_parent_skeleton_in_mesh_instance_3d=true
|
||||
|
||||
config/name="Seeding The Wasteland"
|
||||
config/description="Seeding planets is a survival, managment and cosy game in which you play a little gardener robot."
|
||||
config/version="demo-1.1"
|
||||
config/version="demo-1.2"
|
||||
run/main_scene="uid://c5bruelvqbm1k"
|
||||
config/features=PackedStringArray("4.6", "Forward Plus")
|
||||
config/icon="uid://df0y0s666ui4h"
|
||||
|
||||
@@ -64,7 +64,7 @@ shader = ExtResource("8_pjo5j")
|
||||
shader_parameter/strength = 5.00000023424012
|
||||
shader_parameter/mix_percentage = 0.3
|
||||
|
||||
[sub_resource type="FastNoiseLite" id="FastNoiseLite_1xafb"]
|
||||
[sub_resource type="FastNoiseLite" id="FastNoiseLite_lwj2x"]
|
||||
frequency = 1.0
|
||||
|
||||
[sub_resource type="Animation" id="Animation_gn4uv"]
|
||||
@@ -448,9 +448,12 @@ flat = true
|
||||
[node name="SubViewport" type="SubViewport" parent="." unique_id=1703203942]
|
||||
size = Vector2i(1980, 1080)
|
||||
|
||||
[node name="WorldEnvironment" type="WorldEnvironment" parent="SubViewport" unique_id=902577390]
|
||||
|
||||
[node name="Planet3d" parent="SubViewport" unique_id=926789923 instance=ExtResource("5_7a1qq")]
|
||||
unique_name_in_owner = true
|
||||
noise = SubResource("FastNoiseLite_1xafb")
|
||||
details = 20
|
||||
noise = SubResource("FastNoiseLite_lwj2x")
|
||||
|
||||
[node name="Camera3D" type="Camera3D" parent="SubViewport" unique_id=806252928]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -14.369979, 0, 64.323425)
|
||||
@@ -472,13 +475,11 @@ autoplay = &"arrive"
|
||||
|
||||
[node name="Settings" parent="." unique_id=1832300574 instance=ExtResource("18_lwj2x")]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
z_index = 100
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="Controls" parent="." unique_id=36425199 instance=ExtResource("19_rf16a")]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
z_index = 100
|
||||
mouse_filter = 2
|
||||
|
||||
|
||||
@@ -186,6 +186,9 @@ ENVIRONMENT_VOLUME,Environment Volume,Volume de l'environnement
|
||||
SFX_VOLUME,Sfx Volume,Volume des bruitages
|
||||
VIDEO,Video,Vidéo
|
||||
FULLSCREEN,Fullscreen,Plein écran
|
||||
FOV,Fov,Fov
|
||||
GAME,Game,Jeu
|
||||
AUTO_PICKUP,Auto pickup seeds,Récolte automatique des graines
|
||||
CONTROLS,Controls,Contrôles
|
||||
MOVE_RIGHT,Move right,Déplacement à droite
|
||||
MOVE_LEFT,Move left,Déplacement à gauche
|
||||
|
||||
|
Reference in New Issue
Block a user