Made children spawn
This commit is contained in:
10
Assets/Scripts/Extensions/ListExtensions.cs
Normal file
10
Assets/Scripts/Extensions/ListExtensions.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
public static class ListExtensions
|
||||
{
|
||||
public static T GetRandom<T>(this List<T> list)
|
||||
{
|
||||
int index = UnityEngine.Random.Range(0, list.Count);
|
||||
return list[index];
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/Extensions/ListExtensions.cs.meta
Normal file
3
Assets/Scripts/Extensions/ListExtensions.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cf13893a58ea446491ffdf8b92ddd426
|
||||
timeCreated: 1768299042
|
||||
Reference in New Issue
Block a user