Skip to content

Commit

Permalink
refactor: annotation builder
Browse files Browse the repository at this point in the history
  • Loading branch information
ikpil committed Sep 22, 2023
1 parent 707d91a commit 4f2cc63
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
15 changes: 9 additions & 6 deletions src/DotRecast.Recast.Demo/Tools/JumpLinkBuilderSampleTool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ public JumpLinkBuilderSampleTool()

public void Layout()
{
if (0 >= _sample.GetRecastResults().Count)
return;

ImGui.Text("Options");
ImGui.Separator();
ImGui.SliderFloat("Ground Tolerance", ref _cfg.groundTolerance, 0f, 2f, "%.2f");
Expand All @@ -82,6 +79,7 @@ public void Layout()
//int buildTypes = 0;
ImGui.CheckboxFlags("Climb Down", ref _cfg.buildTypes, JumpLinkType.EDGE_CLIMB_DOWN.Bit);
ImGui.CheckboxFlags("Edge Jump", ref _cfg.buildTypes, JumpLinkType.EDGE_JUMP.Bit);
ImGui.NewLine();
//option.buildTypes = buildTypes;

bool build = false;
Expand All @@ -98,12 +96,17 @@ public void Layout()

if (build || _cfg.buildOffMeshConnections)
{
var geom = _sample.GetInputGeom();
var settings = _sample.GetSettings();
if (0 < _sample.GetRecastResults().Count)
{
var geom = _sample.GetInputGeom();
var settings = _sample.GetSettings();

_tool.Build(geom, settings, _sample.GetRecastResults(), _cfg);
_tool.Build(geom, settings, _sample.GetRecastResults(), _cfg);
}
}

ImGui.NewLine();

ImGui.Text("Debug Draw Options");
ImGui.Separator();
//int newFlags = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ public string GetName()
return "Annotation Builder";
}


public void Clear()
{
_annotationBuilder = null;
Expand Down

0 comments on commit 4f2cc63

Please sign in to comment.