diff --git a/Nez.Portable/Math/Random.cs b/Nez.Portable/Math/Random.cs index 7f37b5d1f..80b0deaee 100644 --- a/Nez.Portable/Math/Random.cs +++ b/Nez.Portable/Math/Random.cs @@ -218,5 +218,15 @@ public static T Choose(T first, T second, T third, T fourth) return fourth; } } + + + /// + /// randomly returns one of the given values + /// + /// The 1st type parameter. + public static T Choose(params T[] options) + { + return options[NextInt(options.Length)]; + } } -} \ No newline at end of file +}