36 var maxValue =
Breaks.Sum(t => t.percentChance);
37 var random = UnityEngine.Random.Range(0, maxValue+1);
41 for (var i = 0; i <
Breaks.Count; i++)
44 upperBorder += breakItem.percentChance;
46 breakItem.IsActive = lowerLimit < random && upperBorder >= random;
48 if (breakItem.IsActive)
55 lowerLimit = upperBorder;