Пример #1
0
    public void DisplayItemCollection()
    {
        List <Item> toBeDisplayed = new List <Item>();

        foreach (Item it in thePlayer.myInventory)
        {
            if (!(UpgradeTab.activeSelf && it.myInfo.myType != "Weapon"))
            {
                toBeDisplayed.Add(it);
            }
        }
        foreach (EquipSlot slot in new List <EquipSlot> {
            thePlayer.myHead, thePlayer.myLeftHand, thePlayer.myRightHand, thePlayer.myBody, thePlayer.myNecklace
        })
        {
            if (slot.equippedItem != null && !(UpgradeTab.activeSelf && slot.equippedItem.myInfo.myType != "Weapon"))
            {
                toBeDisplayed.Add(slot.equippedItem);
            }
        }

        myItemDisplayer.page = 0;
        myItemDisplayer.DisplayItemCollection(toBeDisplayed);
        myItemDisplayer.ActualizeArrow();
    }
Пример #2
0
 public void DisplayMeltingIngredients(bool display)
 {
     if (display)
     {
         meltMenu.SetActive(true);
         meltCollectionDisplayer.DisplayItemCollection(meltCollection);
         thePlayer.SetSlotInteractability(false);
     }
     else
     {
         meltMenu.SetActive(false);
         meltCollectionDisplayer.Hide();
         meltSelection = new List <Item>();
         thePlayer.SetSlotInteractability(true);
     }
 }
Пример #3
0
    public void InitializeLoot(Character monster)
    {
        followerTab.SetActive(false);
        GameObject.Find("Background").GetComponent <LoreHandler>().ExecuteFromTrigger("Kill_" + monster.myInfo.myName, followerTab);

        List <Item> choices = new List <Item>();

        if (forceLoot == null || forceLoot == "")
        {
            myLootDiceDisplayer.DisplayDice(lootDice);

            List <DiceFace> selected = lootDice.rollDistinctFaces(monster.myInfo.lootChoices);

            foreach (DiceFace aFace in selected)
            {
                Item newItem = null;
                switch (aFace.faceName)
                {
                case "GOLD":
                    ItemContent content = new ItemContent(); content.myName = "Gold"; content.goldValue = monster.myInfo.lootValue;
                    newItem = new Item(content);
                    break;

                case "ITEM":
                    newItem = SpawnRandomItem((monster.myInfo.myRarity == " - Champion") ? "Rare" : "Common");
                    newItem.SetOwner(thePlayer);
                    break;
                }
                if (newItem.myInfo.myType == "Weapon" && Random.Range(0f, 1f) < 0.1f)
                {
                    newItem.SetCurse();
                }
                choices.Add(newItem);
            }
        }
        else
        {
            Item newItem = new Item(allItems[forceLoot]); newItem.SetOwner(thePlayer);
            choices.Add(newItem);
            forceLoot = null;
        }
        myLootChoiceDisplayer.DisplayItemCollection(choices);
    }
Пример #4
0
 public void DisplayInventory()
 {
     myInventoryDisplayer.DisplayItemCollection(myInventory);
 }
Пример #5
0
 public void DisplayItemsToBuy()
 {
     buyCollectionDisplayer.DisplayItemCollection(buyCollection);
 }