ajout de la porte et équilibrage des mutations
This commit is contained in:
@@ -14,6 +14,8 @@ var game_data : GameData :
|
||||
|
||||
var settings_data : SettingsData
|
||||
|
||||
var current_dialog_path : String
|
||||
|
||||
func load_game_data() -> GameData:
|
||||
if ResourceLoader.exists(SAVE_GAME_LOCATION):
|
||||
game_loaded = true
|
||||
@@ -57,6 +59,7 @@ func _init():
|
||||
|
||||
func _ready():
|
||||
Dialogic.timeline_started.connect(_on_timeline_started)
|
||||
Dialogic.timeline_ended.connect(_on_timeline_ended)
|
||||
|
||||
func _on_settings_video_changed(s : SettingsData):
|
||||
update_video_settings(s)
|
||||
@@ -70,9 +73,11 @@ func _on_settings_sound_changed(s : SettingsData):
|
||||
AudioServer.set_bus_volume_db(SettingsData.AMBIANCE_BUS_ID, linear_to_db(s.ambiance_volume))
|
||||
|
||||
func _on_timeline_started():
|
||||
var dialog_path = Dialogic.current_timeline.resource_path
|
||||
if not dialog_path in game_data.dialogs_done:
|
||||
game_data.dialogs_done.append(dialog_path)
|
||||
current_dialog_path = Dialogic.current_timeline.resource_path
|
||||
|
||||
func _on_timeline_ended():
|
||||
if not current_dialog_path in game_data.dialogs_done:
|
||||
game_data.dialogs_done.append(current_dialog_path)
|
||||
save_game_data()
|
||||
|
||||
func update_language_settings(s : SettingsData = settings_data):
|
||||
|
||||
Reference in New Issue
Block a user