Started implementing SFX

Fixed Shield animation jumps and secondary attack
Fixed demon wall stone behavior
Made overworld ambient sounds unpausable
This commit is contained in:
2025-11-25 03:04:07 -08:00
parent 3e8c11d55d
commit db7a1df1f7
122 changed files with 2313 additions and 1687 deletions

View File

@@ -33,7 +33,10 @@ public partial class Inventory : Node, IInventory
{
var isAdded = TryAdd(item);
if (isAdded)
{
BroadcastMessage?.Invoke($"{item.ItemName} picked up.");
SfxDatabase.Instance.Play(SoundEffect.PickupItem);
}
else
BroadcastMessage?.Invoke($"Could not pick up {item.ItemName}.");
@@ -66,8 +69,9 @@ public partial class Inventory : Node, IInventory
InventoryChanged?.Invoke();
}
public void Sort(EquipableItem currentWeapon, EquipableItem currentArmor, EquipableItem currentAccessory)
public bool Sort(EquipableItem currentWeapon, EquipableItem currentArmor, EquipableItem currentAccessory)
{
var initialList = Items;
var equippedWeapon = Items.OfType<Weapon>().Where(x => x == currentWeapon);
var equippedArmor = Items.OfType<Armor>().Where(x => x == currentArmor);
var equippedAccessory = Items.OfType<Accessory>().Where(x => x == currentAccessory);
@@ -93,6 +97,8 @@ public partial class Inventory : Node, IInventory
var itemsToRemove = itemStack.Except([firstItem]).Cast<InventoryItem>();
Items = [.. Items.Except(itemsToRemove)];
}
return !Items.SequenceEqual(initialList);
}
public class WeaponComparer : IComparer<Weapon>