requirements foundation

This commit is contained in:
2022-11-07 14:21:00 +01:00
parent 7e9331f612
commit 8719543f96
34 changed files with 332 additions and 160 deletions

View File

@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
namespace Escape_Room_Engine.Engine.Scripts.Utilities
@@ -24,6 +25,7 @@ namespace Escape_Room_Engine.Engine.Scripts.Utilities
public static int RandomInclusive(int from, int to) => Random.Range(from, to + 1);
public static T RandomElement<T>(this List<T> list) => list[Random.Range(0, list.Count)];
public static T RandomElement<T>(this HashSet<T> set) => set.ElementAt(Random.Range(0, set.Count));
#endregion
}