Exemple #1
0
 private void RemoveFromDroppedItems(LootDrop lootDrop)
 {
     if (droppedLoot.Contains(lootDrop))
     {
         droppedLoot.Remove(lootDrop);
     }
 }
Exemple #2
0
        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);
            }
        }