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

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