added cmd to slowdown framerate - good for debugging
parent
f0176ce13f
commit
0f3b9ef3dc
|
@ -171,6 +171,8 @@ namespace Flocking
|
|||
HandleShowStatsCmd ("flock", args);
|
||||
} else if (cmd.StartsWith ("prim")) {
|
||||
HandleSetPrimCmd ("flock", args);
|
||||
} else if (cmd.StartsWith ("framerate")) {
|
||||
HandleSetFrameRateCmd ("flock", args);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -195,6 +197,7 @@ namespace Flocking
|
|||
AddCommand ("size", "num", "Adjust the size of the flock ", HandleSetSizeCmd);
|
||||
AddCommand ("stats", "", "show flocking stats", HandleShowStatsCmd);
|
||||
AddCommand ("prim", "name", "set the prim used for each boid to that passed in", HandleSetPrimCmd);
|
||||
AddCommand ("framerate", "num", "[debugging] only update boids every <num> frames", HandleSetFrameRateCmd);
|
||||
}
|
||||
|
||||
private bool ShouldHandleCmd ()
|
||||
|
@ -233,6 +236,14 @@ namespace Flocking
|
|||
}
|
||||
}
|
||||
|
||||
void HandleSetFrameRateCmd (string module, string[] args)
|
||||
{
|
||||
if (ShouldHandleCmd ()) {
|
||||
int frameRate = Convert.ToInt32( args[1] );
|
||||
m_frameUpdateRate = frameRate;
|
||||
}
|
||||
}
|
||||
|
||||
public void HandleStartCmd (string module, string[] args)
|
||||
{
|
||||
if (ShouldHandleCmd ()) {
|
||||
|
|
Loading…
Reference in New Issue