public void UpdateSlot(InventoryKey key, WeaponSlot slot) { if (_weapons.ContainsKey(key)) { _weapons[key] = slot; } else { _weapons.Add(key, slot); } OnInventoryChanged?.Invoke(key); }
public bool RetrieveSlot(InventoryKey key, out WeaponSlot slot) { return(_weapons.TryGetValue(key, out slot)); }