generic doors
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
using UnityEngine;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Escape_Room_Engine.Engine.Scripts.Utilities
|
||||
{
|
||||
public static class Utilities
|
||||
{
|
||||
#region Math
|
||||
|
||||
public static int RandomInclusive(int from, int to) => Random.Range(from, to + 1);
|
||||
|
||||
/// <summary>
|
||||
/// Returns whether a position relative to some dimensions is inside those dimensions.
|
||||
@@ -19,5 +18,13 @@ namespace Escape_Room_Engine.Engine.Scripts.Utilities
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Randomness
|
||||
|
||||
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)];
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user