public bool putIn(ItemEntity entity) { if (max <= entities.Count) { return(false); } entities.Add(entity); return(true); }
public static void setInventory(int entity_id, ItemEntity item) { if (!inventory_list.ContainsKey(entity_id)) { //Debug.Log("inventory_list.Count: " + inventory_list.Count); throw new KeyNotFoundException("Key not found: " + entity_id); } inventory_list[entity_id].putIn(item); }