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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user