コード例 #1
0
ファイル: PCDef.cs プロジェクト: McGake/AlsoTheDarkness
    private Equipable SetNew(Equipable slot, Equipable itemToSet)
    {
        if (slot != null)
        {
            RemoveEquipmentEffects(slot);
            PartyManager.AddItemToCurrentParty(slot);
        }
        AddEquipmentEffects(itemToSet);
        PartyManager.RemoveItemFromCurrentParty(itemToSet);

        return(itemToSet);
    }
コード例 #2
0
ファイル: Buy.cs プロジェクト: McGake/AlsoTheDarkness
    public void DoSelectionBehavior()
    {
        if (PartyManager.curParty.gp > thisItem.price)
        {
            PartyManager.curParty.gp -= thisItem.price;

            //A copy of the item should probably be made here.

            Item tempItem = new Item(thisItem.item);

            tempItem.sellPrice = thisItem.price / 2;

            PartyManager.AddItemToCurrentParty(tempItem);

            //Make item factor to create item for inventory
        }
        //Check if can afford item. if can subtract value from gold and add item to inventory.
    }