|
using UnityEngine;
|
|
|
|
public static class ArrayExtensions {
|
|
|
|
public static T RandomChoose<T>(this T[] array){
|
|
return array[Random.Range(0, array.Length)];
|
|
}
|
|
|
|
public static T RandomChoose<T>(this T[] array, System.Random rand){
|
|
return array[rand.Next(array.Length)];
|
|
}
|
|
}
|