1 private void GetWeightPercentages()
2 {
3 weightPercentages.Clear();
4
5 for (int i = 0; i < lootEntries.Count; i++ )
6 {
7 //Get the probability of the item based upon the total probability
8 int percent = Mathf.RoundToInt(((float)lootEntries[i].Weight / (float)totalWeights) * 100);
9
10 weightPercentages.Add(percent);
11 }
12 }