public static bool IsShortage(string categoryId, string cost) { bool result = false; int cost2 = 0; if (int.TryParse(cost, out cost2)) { result = FarmUtility.IsShortageToInt(categoryId, cost2); } return result; }
private void SetCostLabel(string categoryId, int costValue) { this.costValueLabel.text = FarmUtility.GetCostString(categoryId, costValue); if (FarmUtility.IsShortageToInt(categoryId, costValue)) { this.costValueLabel.color = Color.red; } else { this.costValueLabel.color = Color.white; } }