forked from team-sg/hero-mark-2
music fades out on famira death
This commit is contained in:
parent
d06eee6455
commit
94840d9744
4 changed files with 10 additions and 1 deletions
|
@ -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:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=59 format=2]
|
||||
[gd_scene load_steps=60 format=2]
|
||||
|
||||
[ext_resource path="res://objects/enemy/boss/famira.gd" type="Script" id=1]
|
||||
[ext_resource path="res://shaders/scale3x.gdshader" type="Shader" id=2]
|
||||
|
@ -4415,6 +4415,8 @@ collide_with_bodies = false
|
|||
stream = ExtResource( 27 )
|
||||
volume_db = -10.0
|
||||
|
||||
[node name="Tween" type="Tween" parent="."]
|
||||
|
||||
[connection signal="area_entered" from="Hitbox" to="." method="_on_Hitbox_area_entered"]
|
||||
[connection signal="body_entered" from="Hitbox" to="." method="_on_Hitbox_body_entered"]
|
||||
[connection signal="state_entered" from="StateChart/Root/Roar" to="." method="_on_Roar_state_entered" flags=3]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue