suppression des print de debug et ajout du code des timeline dans l'audio manager

This commit is contained in:
2026-02-07 17:05:48 +01:00
parent 9570fd96c2
commit 4b8e59ee56
3 changed files with 6 additions and 6 deletions

View File

@@ -22,6 +22,7 @@ func _ready():
func(_s) : setup_volume()
)
SceneManager.scene_loaded.connect(_on_change_scene)
Dialogic.timeline_started.connect(_on_timeline_started)
func _on_change_scene(scene : Scene):
play_ambiance()
@@ -35,6 +36,11 @@ func _on_change_scene(scene : Scene):
"COCKPIT":
play_music("Truck")
func _on_timeline_started():
var timeline_name = Dialogic.current_timeline.resource_path.split("/")[-1].trim_suffix(".dtl")
# Timeline name et le nom du fichier de timeline, par exemple demeter_intro
# Amuse toi Niels ;)
func fetch_default_volumes():
var all_players := get_all_players()
@@ -96,7 +102,6 @@ func play_music(music_name : String = ""):
if old_music:
await set_volume(old_music, MIN_VOLUME).finished
if old_music and old_music != playing_music:
print(old_music)
old_music.stop()
reset_volume(old_music)
if music_name:

View File

@@ -34,5 +34,4 @@ func set_energy(_energy : int = energy):
await battery.ready
if battery is Battery3d:
battery.powered = energy_count < energy
print(battery.powered)
energy_count += 1

View File

@@ -123,15 +123,11 @@ func add_plant_data(plant_data : PlantData, with_update = true):
_on_plant_updated(plant_data)
func _on_plant_updated(plant_data : PlantData):
print("for plant %s" % plant_data.plant_name)
var old_plant_score = score_by_plant[plant_data]
print("old score = %d" % old_plant_score)
score_by_plant[plant_data] = plant_data.get_score()
print("new score = %d" % score_by_plant[plant_data])
if old_plant_score != score_by_plant[plant_data]:
print("plant changin score")
plant_changing_score.emit(plant_data, score_by_plant[plant_data] - old_plant_score)
update()