Esempio n. 1
0
    public void Lose(Item item) {
        if (selected == item) {
            if (items.Count >= 2) {
                ChangeSelected(1);
            } else {
                selected = null; 
            }
        }
        items.Remove(item);
        if (DebugManager.debug) {
            Debug.Log(string.Format("Lost {0}", item));
        }

        item.inventorySlot.Free();
        item.Lost(unit);

        onChanged();
    }