public static void Suffle <T> (this T[] array, EiRandom random, int amount) { int count = array.Length; T tempValue; for (int i = 0; i < amount; i++) { var index1 = random._Range(count); var index2 = random._Range(count); tempValue = array [index1]; array [index1] = array [index2]; array [index2] = tempValue; } }
public virtual T Dequeue() { if (!HasValues) { return(default(T)); } var index = random._Range(0, content.Count); var value = content [index]; content.RemoveAt(index); return(value); }
public float GetRandomValue(EiRandom random) { return(random._Range(minValue, maxValue)); }