music fades out on famira death

This commit is contained in:
pennyrigate 2024-07-12 20:07:36 -04:00
parent d06eee6455
commit 94840d9744
4 changed files with 10 additions and 1 deletions

View file

@ -117,6 +117,12 @@ func _on_PushedBack_state_entered() -> void:
func _on_Dying_state_entered() -> void:
animation_player.play("die", 0.25)
Audio.play_sound(Audio.a_famira_die, Audio.ac_boss)
var tween = $Tween
tween.interpolate_property(Audio.ac_music, "volume_db",
Audio.ac_music.volume_db, -99, 16,
Tween.TRANS_LINEAR, Tween.EASE_IN_OUT)
tween.start()
func _on_Chasing_state_physics_processing(delta) -> void: