Add more sound effect implementations

This commit is contained in:
2026-06-16 21:17:23 -07:00
parent bbadf9ccec
commit 8158156f09
13 changed files with 689 additions and 695 deletions
+3 -1
View File
@@ -779,7 +779,6 @@ public partial class Player : CharacterBody3D, IPlayer, IProvide<IPlayer>
private void PlayAttackAnimation()
{
var weapon = (Weapon)EquipmentComponent.EquippedWeapon.Value;
SfxDatabase.Instance.Play(weapon.SoundEffect);
WeaponAnimations.SetSpeedScale((float)weapon.AttackSpeed);
var potentialAnimName = weapon.Stats.Name;
if (WeaponAnimations.HasAnimation(potentialAnimName))
@@ -958,7 +957,10 @@ public partial class Player : CharacterBody3D, IPlayer, IProvide<IPlayer>
if (rng.Randf() <= rustChance)
{
if (rng.Randf() >= 0.5f && ((Accessory)EquipmentComponent.EquippedAccessory.Value).AccessoryTag != AccessoryTag.StatusEffectImmunity && ((Armor)EquipmentComponent.EquippedArmor.Value).ArmorTag != ArmorTag.ImmuneToRust)
{
StatusEffectComponent.Rust.OnNext(true);
SfxDatabase.Instance.Play(SoundEffect.Rust);
}
else
enemy.StatusEffectComponent.Rust.OnNext(true);
}