forked from bit/DotRecastNetSim
for unity3d
This commit is contained in:
parent
32251f756f
commit
a331b3e861
|
@ -0,0 +1,24 @@
|
||||||
|
using DotRecast.Core;
|
||||||
|
|
||||||
|
namespace DotRecast.Detour
|
||||||
|
{
|
||||||
|
public class DtStraightPathOption
|
||||||
|
{
|
||||||
|
public static readonly DtStraightPathOption None = new DtStraightPathOption(0, "None");
|
||||||
|
public static readonly DtStraightPathOption AreaCrossings = new DtStraightPathOption(DtNavMeshQuery.DT_STRAIGHTPATH_AREA_CROSSINGS, "Area");
|
||||||
|
public static readonly DtStraightPathOption AllCrossings = new DtStraightPathOption(DtNavMeshQuery.DT_STRAIGHTPATH_ALL_CROSSINGS, "All");
|
||||||
|
|
||||||
|
public static readonly RcImmutableArray<DtStraightPathOption> Values = RcImmutableArray.Create(
|
||||||
|
None, AreaCrossings, AllCrossings
|
||||||
|
);
|
||||||
|
|
||||||
|
public readonly int Value;
|
||||||
|
public readonly string Label;
|
||||||
|
|
||||||
|
private DtStraightPathOption(int value, string label)
|
||||||
|
{
|
||||||
|
Value = value;
|
||||||
|
Label = label;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -126,9 +126,9 @@ public class TestNavmeshSampleTool : ISampleTool
|
||||||
{
|
{
|
||||||
ImGui.Text("Vertices at crossings");
|
ImGui.Text("Vertices at crossings");
|
||||||
ImGui.Separator();
|
ImGui.Separator();
|
||||||
ImGui.RadioButton("None", ref _option.straightPathOptions, 0);
|
ImGui.RadioButton("None", ref _option.straightPathOptions, DtStraightPathOption.None.Value);
|
||||||
ImGui.RadioButton("Area", ref _option.straightPathOptions, DtNavMeshQuery.DT_STRAIGHTPATH_AREA_CROSSINGS);
|
ImGui.RadioButton("Area", ref _option.straightPathOptions, DtStraightPathOption.AreaCrossings.Value);
|
||||||
ImGui.RadioButton("All", ref _option.straightPathOptions, DtNavMeshQuery.DT_STRAIGHTPATH_ALL_CROSSINGS);
|
ImGui.RadioButton("All", ref _option.straightPathOptions, DtStraightPathOption.AllCrossings.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_option.mode == RcTestNavmeshToolMode.RANDOM_POINTS_IN_CIRCLE)
|
if (_option.mode == RcTestNavmeshToolMode.RANDOM_POINTS_IN_CIRCLE)
|
||||||
|
|
Loading…
Reference in New Issue