diff --git a/scenes/player.gd b/scenes/player.gd index e22b485..bfcfe53 100644 --- a/scenes/player.gd +++ b/scenes/player.gd @@ -793,26 +793,11 @@ func apply_stagger(duration: float = 1.5): _apply_tint_recursive(self , Color.WHITE) # Remove tint func _play_knock_vfx() -> void: - """Plays the three knock receiver VFX in sequence: top -> bot -> stunned. + """Plays the three knock receiver VFX concurrently. Each hides itself once its animation finishes.""" - # 1. attack_mode_top - if vfx_attack_top: - vfx_attack_top.visible = true - vfx_attack_top.play() - await vfx_attack_top.animation_finished - vfx_attack_top.visible = false - # 2. attack_mode_bot - if vfx_attack_bot: - vfx_attack_bot.visible = true - vfx_attack_bot.play() - await vfx_attack_bot.animation_finished - vfx_attack_bot.visible = false - # 3. receiver_skill_stunned - if vfx_stunned: - vfx_stunned.visible = true - vfx_stunned.play() - await vfx_stunned.animation_finished - vfx_stunned.visible = false + play_skill_vfx("attack_mode_top") + play_skill_vfx("attack_mode_bot") + play_skill_vfx("receiver_skill_stunned") @rpc("any_peer", "call_local", "reliable") func sync_stop_freeze(enabled: bool): diff --git a/scripts/managers/sfx_manager.gd.uid b/scripts/managers/sfx_manager.gd.uid new file mode 100644 index 0000000..bb007c4 --- /dev/null +++ b/scripts/managers/sfx_manager.gd.uid @@ -0,0 +1 @@ +uid://dqq36uawrnpwd