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.Armor: if (Gold >= GoldCost) { equipList.UpgradeArmor(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; } }