This commit is contained in:
Simon Lübeß
2024-04-07 15:46:17 +02:00
parent 82216fa8a7
commit 0cc9ddba16
33 changed files with 2659 additions and 442 deletions

View File

@ -7,6 +7,9 @@ namespace Utility
{
public static T GetRandomElement<T>(this IReadOnlyList<T> list)
{
if (list.Count == 0)
return default;
return list[Random.Range(0, list.Count)];
}
}