public void Repair() { if (DB_Resources.GetItem(2).quantity >= repairCost) { DB_Resources.GetItem(2).quantity -= repairCost; equipment.Repair(); Initial(); ResourcesUIControl.SetResoucesValue(); DB_EquipmentInventory.SaveEquipData(); DB_Resources.SaveResoucesData(); } }
//Btn Action public void Unlock() { if (DB_Resources.GetItem(1).quantity >= unlockCost) { DB_Resources.GetItem(1).quantity -= unlockCost; equipment.UnlockItem(); Initial(); ResourcesUIControl.SetResoucesValue(); DB_EquipmentInventory.SaveEquipData(); DB_Resources.SaveResoucesData(); } }