public void Shopbttn_addBonus (int index) {
try {
if (Score >= ShopCosts[index]) {
Bonus += ShopBonuses[index];
Score -= ShopCosts[index];
ShopCosts[index] *= 2;
ShopBttnsText[index].text = "КУПИТЬ УЛУЧШЕНИЕ \n" + ShopCosts[index] + "$";
} else {
Debug.Log ("Не хватает!");
}
} catch (Exception e) {
Debug.Log ($"Неверный индекс кнопки. Был передан индекс {index}, " +
"валидные числа индекса для массива: " +
$"ShopCosts - от 0 до {ShopCosts.Count - 1}" +
$"ShopBonuses - от 0 до {ShopBonuses.Count - 1}" +
$"ShopBttnsText - от 0 до {ShopBttnsText.Count - 1}");
}
}