Merge branch 'main' of ssh://gitfrieds.nackenbox.xyz:3011/MeigoFried/GameVsJam
This commit is contained in:
13
3d Prototyp/Assets/Scripts/Utility/IReadonlyListExtension.cs
Normal file
13
3d Prototyp/Assets/Scripts/Utility/IReadonlyListExtension.cs
Normal file
@ -0,0 +1,13 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Utility
|
||||
{
|
||||
public static class IReadonlyListExtension
|
||||
{
|
||||
public static T GetRandomElement<T>(this IReadOnlyList<T> list)
|
||||
{
|
||||
return list[Random.Range(0, list.Count)];
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a37950394de44b8db5d8de3e9fd574a6
|
||||
timeCreated: 1712430620
|
||||
Reference in New Issue
Block a user