first
This commit is contained in:
13
Assets/02_Scripts/_Util/IntRange.cs
Normal file
13
Assets/02_Scripts/_Util/IntRange.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
|
||||
// 정수 범위 (양끝 포함). 인스펙터에서는 "라벨 [Min] ~ [Max]" 한 줄로 그려진다 (IntRangeDrawer).
|
||||
[Serializable]
|
||||
public struct IntRange
|
||||
{
|
||||
public int Min;
|
||||
public int Max;
|
||||
|
||||
public IntRange(int min, int max) { Min = min; Max = max; }
|
||||
|
||||
public bool Contains(int value) => value >= Min && value <= Max;
|
||||
}
|
||||
Reference in New Issue
Block a user