Exemplo n.º 1
0
 private void PerformGiveItem(Item itemToAdd)
 {
     inventoryController.AddToListOfCurrentItems(itemToAdd);
     inventoryUI.AddItemToUI(itemToAdd);
     playerItems.Add(new Item(itemToAdd));
     itemToAdd.Collect();
 }
        public void Load()
        {
            ES3.LoadInto("PartyMembers", "Party.json", partyMembers);
            ES3.LoadInto("Enemies", "Enemies.json", enemyList);
            activePartyMembers.Clear();
            ES3.Load <List <string> >("ActiveParty", "ActiveParty.json").ForEach(member => activePartyMembers.Add(member));

            partyMembers.ForEach(member => {
                foreach (Item item in member.equipment)
                {
                    if (item != null && item.icon == null)
                    {
                        item.LoadSprite();
                        inventoryController.AddToListOfCurrentItems(item);
                    }
                }
            });
        }