added tile tool template

This commit is contained in:
ikpil 2023-07-26 23:13:21 +09:00
parent 061c4469ed
commit 0832ed3fdb
4 changed files with 71 additions and 2 deletions

View File

@ -382,6 +382,7 @@ public class RecastDemo : IRecastDemoChannel
toolset = new RcToolsetView( toolset = new RcToolsetView(
new TestNavmeshTool(), new TestNavmeshTool(),
new TileTool(),
new OffMeshConnectionTool(), new OffMeshConnectionTool(),
new ConvexVolumeTool(), new ConvexVolumeTool(),
new CrowdTool(), new CrowdTool(),

View File

@ -0,0 +1,45 @@
using DotRecast.Core;
using DotRecast.Recast.Demo.Draw;
using DotRecast.Recast.DemoTool;
using DotRecast.Recast.DemoTool.Tools;
namespace DotRecast.Recast.Demo.Tools;
public class TileTool : IRcTool
{
private readonly TileToolImpl _impl;
public TileTool()
{
_impl = new();
}
public ISampleTool GetTool()
{
return _impl;
}
public void OnSampleChanged()
{
}
public void Layout()
{
}
public void HandleClick(RcVec3f s, RcVec3f p, bool shift)
{
}
public void HandleRender(NavMeshRenderer renderer)
{
}
public void HandleUpdate(float dt)
{
}
public void HandleClickRay(RcVec3f start, RcVec3f direction, bool shift)
{
}
}

View File

@ -2,12 +2,13 @@
{ {
public class CrowdToolImpl : ISampleTool public class CrowdToolImpl : ISampleTool
{ {
private Sample _sample;
public string GetName() public string GetName()
{ {
return "Crowd"; return "Create Crowd";
} }
private Sample _sample;
public void SetSample(Sample sample) public void SetSample(Sample sample)
{ {
_sample = sample; _sample = sample;

View File

@ -0,0 +1,22 @@
namespace DotRecast.Recast.DemoTool.Tools
{
public class TileToolImpl : ISampleTool
{
private Sample _sample;
public string GetName()
{
return "Create Tiles";
}
public void SetSample(Sample sample)
{
_sample = sample;
}
public Sample GetSample()
{
return _sample;
}
}
}