public WeightedSimHash GetOneWeightedSimHash(string item, SeededRandom rnd) { if (ElementChoiceGroups.ContainsKey(item)) { return(WeightedRandom.Choose(ElementChoiceGroups[item].choices, rnd)); } Debug.LogError("Couldnt get SimHash [" + item + "]"); return(null); }
public WeightedMob GetNextMob(SeededRandom rnd) { WeightedMob result = null; switch (mobselection) { case Selection.Weighted: result = WeightedRandom.Choose(mobs, rnd); break; case Selection.OneOfEach: case Selection.WeightedBucket: if (mobIter.MoveNext()) { result = mobIter.Current; } break; } return(result); }