AwesomeRunner/Assets/Scripts/Extentions/RandomExtentions.cs
VladimirPirozhenko c7a0ad0f90 Added obstacles, started working on chunk generator
Added obstacles, updated pools, added extention for list, updated LaneSystem
2022-08-09 04:43:03 +03:00

13 lines
251 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public static class RandomExtentions
{
public static T GetRandomElement<T>(this List<T> list)
{
return list[Random.Range(0, list.Count)];
}
}