private void RemoveFromDroppedItems(LootDrop lootDrop) { if (droppedLoot.Contains(lootDrop)) { droppedLoot.Remove(lootDrop); } }
public void TakeLoot(LootDrop lootDrop) { //Debug.Log("LootUI.TakeLoot(" + loot.MyName + ")"); pages[pageIndex].Remove(lootDrop); RemoveFromDroppedItems(lootDrop); lootDrop.Remove(); SystemEventManager.MyInstance.NotifyOnTakeLoot(); if (pages[pageIndex].Count == 0) { // removes the empty page pages.Remove(pages[pageIndex]); if (pageIndex == pages.Count && pageIndex > 0) { pageIndex--; } AddLoot(); OnPageCountUpdate(true); } }