예제 #1
0
    public void UpgradeGear(GearType gear, int UpgradeIndex, int GoldCost)
    {
        switch (gear.Gear)
        {
        case GearType.Type.Sword:
            if (Gold >= GoldCost)
            {
                equipList.UpgradeSword(UpgradeIndex);
                Gold -= GoldCost;
            }
            else
            {
                NotEnoughGold();
            }

            break;

        case GearType.Type.Shield:
            if (Gold >= GoldCost)
            {
                equipList.UpgradeShield(UpgradeIndex);
                Gold -= GoldCost;
            }
            else
            {
                NotEnoughGold();
            }
            break;

        case GearType.Type.Quiver:
            if (Gold >= GoldCost)
            {
                equipList.UpgradeQuiver(UpgradeIndex);
                Gold -= GoldCost;
            }
            else
            {
                NotEnoughGold();
            }
            break;

        case GearType.Type.Bow:
            if (Gold >= GoldCost)
            {
                equipList.UpgradeBow(UpgradeIndex);
                Gold -= GoldCost;
            }
            else
            {
                NotEnoughGold();
            }
            break;
        }
    }