예제 #1
0
        public void UpdateSlot(InventoryKey key, WeaponSlot slot)
        {
            if (_weapons.ContainsKey(key))
            {
                _weapons[key] = slot;
            }
            else
            {
                _weapons.Add(key, slot);
            }

            OnInventoryChanged?.Invoke(key);
        }
예제 #2
0
 public bool RetrieveSlot(InventoryKey key, out WeaponSlot slot)
 {
     return(_weapons.TryGetValue(key, out slot));
 }