Rename PhysicsBot => Bot since it doesn't just exercise physics anymore

remove-scene-viewer
Justin Clark-Casey (justincc) 2011-11-03 22:39:06 +00:00
parent ca2c25ece2
commit f26fdbd8da
5 changed files with 12 additions and 12 deletions

View File

@ -41,7 +41,7 @@ namespace pCampBot
/// </remarks>
public class GrabbingBehaviour : IBehaviour
{
public void Action(PhysicsBot bot)
public void Action(Bot bot)
{
Dictionary<UUID, Primitive> objects = bot.Objects;

View File

@ -49,7 +49,7 @@ namespace pCampBot
talkarray = readexcuses();
}
public void Action(PhysicsBot bot)
public void Action(Bot bot)
{
int walkorrun = bot.Random.Next(4); // Randomize between walking and running. The greater this number,
// the greater the bot's chances to walk instead of run.

View File

@ -43,11 +43,11 @@ using Timer = System.Timers.Timer;
namespace pCampBot
{
public class PhysicsBot
public class Bot
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public delegate void AnEvent(PhysicsBot callbot, EventType someevent); // event delegate for bot events
public delegate void AnEvent(Bot callbot, EventType someevent); // event delegate for bot events
public BotManager BotManager { get; private set; }
private IConfig startupConfig; // bot config, passed from BotManager
@ -119,7 +119,7 @@ namespace pCampBot
/// <param name="password"></param>
/// <param name="loginUri"></param>
/// <param name="behaviours"></param>
public PhysicsBot(
public Bot(
BotManager bm, List<IBehaviour> behaviours,
string firstName, string lastName, string password, string loginUri)
{

View File

@ -49,7 +49,7 @@ namespace pCampBot
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
protected CommandConsole m_console;
protected List<PhysicsBot> m_lBot;
protected List<Bot> m_lBot;
protected Random somthing = new Random(Environment.TickCount);
protected int numbots = 0;
public IConfig Config { get; private set; }
@ -103,7 +103,7 @@ namespace pCampBot
// "add bots <number>",
// "Add more bots", HandleAddBots);
m_lBot = new List<PhysicsBot>();
m_lBot = new List<Bot>();
}
/// <summary>
@ -175,7 +175,7 @@ namespace pCampBot
int pos, BotManager bm, List<IBehaviour> behaviours,
string firstName, string lastName, string password, string loginUri)
{
PhysicsBot pb = new PhysicsBot(bm, behaviours, firstName, lastName, password, loginUri);
Bot pb = new Bot(bm, behaviours, firstName, lastName, password, loginUri);
pb.OnConnected += handlebotEvent;
pb.OnDisconnected += handlebotEvent;
@ -194,7 +194,7 @@ namespace pCampBot
/// </summary>
/// <param name="callbot"></param>
/// <param name="eventt"></param>
private void handlebotEvent(PhysicsBot callbot, EventType eventt)
private void handlebotEvent(Bot callbot, EventType eventt)
{
switch (eventt)
{
@ -219,7 +219,7 @@ namespace pCampBot
public void doBotShutdown()
{
lock (m_lBot)
foreach (PhysicsBot pb in m_lBot)
foreach (Bot pb in m_lBot)
pb.shutdown();
}
@ -245,7 +245,7 @@ namespace pCampBot
lock (m_lBot)
{
foreach (PhysicsBot pb in m_lBot)
foreach (Bot pb in m_lBot)
{
MainConsole.Instance.OutputFormat(
outputFormat, pb.Name, (pb.IsConnected ? "Connected" : "Disconnected"));

View File

@ -31,6 +31,6 @@ namespace pCampBot.Interfaces
{
public interface IBehaviour
{
void Action(PhysicsBot bot);
void Action(Bot bot);
}
}