forked from mirror/DotRecast
feat skip updates for unselected tools
This commit is contained in:
parent
9744987da7
commit
db13598295
|
@ -497,7 +497,11 @@ public class RecastDemo : IRecastDemoChannel
|
||||||
timeAcc -= DELTA_TIME;
|
timeAcc -= DELTA_TIME;
|
||||||
if (simIter < 5 && _sample != null)
|
if (simIter < 5 && _sample != null)
|
||||||
{
|
{
|
||||||
toolset.HandleUpdate(DELTA_TIME);
|
var tool = toolset.GetTool();
|
||||||
|
if (null != tool)
|
||||||
|
{
|
||||||
|
tool.HandleUpdate(DELTA_TIME);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
simIter++;
|
simIter++;
|
||||||
|
|
|
@ -105,9 +105,4 @@ public class RcToolsetView : IRcView
|
||||||
tools.ForEach(t => t.SetSample(sample));
|
tools.ForEach(t => t.SetSample(sample));
|
||||||
tools.ForEach(t => t.OnSampleChanged());
|
tools.ForEach(t => t.OnSampleChanged());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void HandleUpdate(float dt)
|
|
||||||
{
|
|
||||||
tools.ForEach(t => t.HandleUpdate(dt));
|
|
||||||
}
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue