// Constructor public ConsoleBotInstance(GridClient client) { m_globalInstance = this; m_Client = client; m_netManager = new NetworkManager(this); m_moveManager = new MovementManager(this); m_objManager = new ObjectEvtManager(this); }
// Constructor public NetworkManager() { m_FirstName = null; m_LastName = strFixedLastName; m_Password = null; m_BotInstance = null; m_bSetLoginParam = false; }
public ActionManager(ConsoleBotInstance instance) { m_BotInstance = instance; m_MoveManager = m_BotInstance.MoveManager; m_Timer = new System.Timers.Timer(500); m_Timer.Elapsed += new ElapsedEventHandler(ActionTimerElapsed); m_Timer.Enabled = false; m_CurrentAction = Action.None; m_bEableAction = false; }
public MovementManager() { // do nothing m_BotInstance = null; m_Client = null; m_GoForward = false; m_GoBack = false; m_TurnRight = false; m_TurnLeft = false; m_Flying = false; }
public ChatManager(ConsoleBotInstance botInstance) { m_Client = botInstance.Client; m_objManager = botInstance.ObjEvtManager; m_actionManager = new ActionManager(botInstance); m_Client.Self.ChatFromSimulator += new EventHandler <ChatEventArgs>(OnChatFromSimulator); // m_Sensor = new Sensor("jl2", "user2", botInstance.NetManager.Password, Constant.NODE_PERCEPT); m_Sensor = new Sensor("jl2", botInstance.NetManager.Username + "_client", botInstance.NetManager.Password, botInstance.NetManager.Username + "_percept"); m_Sensor.SensorCreateEvent += new SensorCreateEventHandler(OnSensorCreateEvent); }
public ChatManager(ConsoleBotInstance botInstance) { m_Client = botInstance.Client; m_objManager = botInstance.ObjEvtManager; m_actionManager = new ActionManager(botInstance); m_Client.Self.ChatFromSimulator += new EventHandler<ChatEventArgs>(OnChatFromSimulator); // m_Sensor = new Sensor("jl2", "user2", botInstance.NetManager.Password, Constant.NODE_PERCEPT); m_Sensor = new Sensor("jl2", botInstance.NetManager.Username + "_client", botInstance.NetManager.Password, botInstance.NetManager.Username + "_percept"); m_Sensor.SensorCreateEvent += new SensorCreateEventHandler(OnSensorCreateEvent); }
public NetworkManager(ConsoleBotInstance botInstance) { m_FirstName = null; m_LastName = strFixedLastName; m_Password = null; m_BotInstance = botInstance; m_GridClient = m_BotInstance.Client; m_bSetLoginParam = false; if (m_GridClient != null) RegisterEventHandler(); }
public MovementManager(ConsoleBotInstance instance) { m_BotInstance = instance; m_Client = m_BotInstance.Client; m_GoForward = false; m_GoBack = false; m_TurnRight = false; m_TurnLeft = false; m_Flying = false; m_Timer = new System.Timers.Timer(500); m_Timer.Elapsed += new ElapsedEventHandler(TurnTimerElapsed); m_Timer.Enabled = false; }
public ObjectEvtManager(ConsoleBotInstance botInstance) { m_botInstance = botInstance; m_GridClient = botInstance.Client; m_rotation = m_GridClient.Self.SimRotation; if (m_GridClient != null) { RegisterEventHandler(); } m_ir = new IntentionRecogniser(botInstance); m_PosDest = new Vector3(NOINIT, NOINIT, NOINIT); m_oldPos = new Vector3(NOINIT, NOINIT, NOINIT); }
public NetworkManager(ConsoleBotInstance botInstance) { m_FirstName = null; m_LastName = strFixedLastName; m_Password = null; m_BotInstance = botInstance; m_GridClient = m_BotInstance.Client; m_bSetLoginParam = false; if (m_GridClient != null) { RegisterEventHandler(); } }
static void Main(string[] args) { // Init instance ConsoleBotInstance instance = ConsoleBotInstance.GloblaInstance; // Set login parameter from user input if (instance.NetManager.SetLoginParam(args) != true) { Console.WriteLine("Fail to set login info. Try again"); return; } else { instance.InitailiseBSF(instance.NetManager.Username, instance.NetManager.Password); } // Run main program in Bot instance.Run(); }
////////////////////////////////////////////////////////////////////////// // Methods ////////////////////////////////////////////////////////////////////////// // Constructor public ConsoleBotInstance() { m_globalInstance = this; m_Client = new GridClient(); }