25 newComponent.m_Name = pName;
26 newComponent.m_Weight = pWeight;
28 pHitComponents.Insert(newComponent);
42 int weights = SumOfWeights(pHitComponents);
43 float rnd =
Math.RandomInt(0, weights);
45 for (
int i = 0; i < pHitComponents.Count(); ++i )
48 rnd -= hitComp.m_Weight;
52 pHitComponent = hitComp.m_Name;
72 for(
int i = 0; i < pHitComponents.Count(); ++i )
75 sum += hitComp.m_Weight;