forked from mirror/DotRecast
add ofidx
This commit is contained in:
parent
4c97468f06
commit
9d080e3b83
|
@ -1,4 +1,5 @@
|
|||
using System.Collections.Immutable;
|
||||
using System.Linq;
|
||||
|
||||
namespace DotRecast.Recast
|
||||
{
|
||||
|
@ -21,6 +22,11 @@ namespace DotRecast.Recast
|
|||
Name = name;
|
||||
}
|
||||
|
||||
public static PartitionType OfIdx(int idx)
|
||||
{
|
||||
return Values.FirstOrDefault(x => x.Idx == idx) ?? WATERSHED;
|
||||
}
|
||||
|
||||
public override string ToString() => Name;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue