예제 #1
0
        public void TakeAllItems()
        {
            PlayerInventory inventory = GetComponent <UIActivator>().Interacter.GetComponent <Interacter>().mainInventory;

            inventory.AddItems(storage.GetItemList());
            storage.DeleteAllItems();
        }
예제 #2
0
        public void TeleportAllItems(GameObject interacter)
        {
            SimpleInventory playerInventory = interacter.GetComponent <Interacter>().inventory;

            connectedBank.AddLoot(playerInventory.GetItemList());
            playerInventory.DeleteAllItems();
        }
예제 #3
0
 public void RemoveAllItems()
 {
     foreach (var item in list.GetItemList())
     {
         RemoveItemFromRecycler(item);
     }
     RecycleValue = 0;
 }
예제 #4
0
        //n -> every n'th item is teleportet
        public void TeleportPortionOfItems(GameObject interacter, float n)
        {
            SimpleInventory playerInventory = interacter.GetComponent <Interacter>().inventory;
            List <Item>     savedLoot       = new List <Item>();
            int             count           = 0;

            foreach (var item in playerInventory.GetItemList())
            {
                count++;
                if (count % n == 0)
                {
                    savedLoot.Add(item);
                }
            }

            connectedBank.AddLoot(savedLoot);
            playerInventory.DeleteAllItems();
        }