![]() |
tModLoader v2024.07
A mod to make and play Terraria mods
|
Public Member Functions | |
WeightedRandom (int seed) | |
WeightedRandom (int seed, params Tuple< T, double >[] theElements) | |
WeightedRandom (params Tuple< T, double >[] theElements) | |
WeightedRandom (UnifiedRandom random) | |
WeightedRandom (UnifiedRandom random, params Tuple< T, double >[] theElements) | |
void | Add (T element, double weight=1.0) |
void | CalculateTotalWeight () |
void | Clear () |
T | Get () |
Static Public Member Functions | |
static implicit | operator T (WeightedRandom< T > weightedRandom) |
Public Attributes | |
readonly List< Tuple< T, double > > | elements = new List<Tuple<T, double>>() |
bool | needsRefresh = true |
readonly UnifiedRandom | random |