LethalCompany/Lethal Company/ExportedProject/Assets/Scripts/Assembly-CSharp/DunGen/IntRange.cs

37 lines
427 B
C#
Raw Normal View History

2023-12-22 22:51:17 +00:00
using System;
namespace DunGen
{
[Serializable]
public class IntRange
{
public int Min;
public int Max;
public IntRange()
{
}
public IntRange(int min, int max)
{
Min = min;
Max = max;
}
public int GetRandom(RandomStream random)
{
if (Min > Max)
{
Max = Min;
}
return random.Next(Min, Max + 1);
}
public override string ToString()
{
return Min + " - " + Max;
}
}
}