public void TakeAllItems() { PlayerInventory inventory = GetComponent <UIActivator>().Interacter.GetComponent <Interacter>().mainInventory; inventory.AddItems(storage.GetItemList()); storage.DeleteAllItems(); }
public void TeleportAllItems(GameObject interacter) { SimpleInventory playerInventory = interacter.GetComponent <Interacter>().inventory; connectedBank.AddLoot(playerInventory.GetItemList()); playerInventory.DeleteAllItems(); }
//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(); }
public void Recycle() { playerInventory.AddGems(RecycleValue); RecycleValue = 0; list.DeleteAllItems(); }