Example #1
0
 public void Stop()
 {
     Output.Instance.Log("char", "Stopping bot ...");
     if (workerThread != null)
     {
         workerThread.Stop();
         workerThread = null;
         Output.Instance.Log("char", "Bot stopped");
     } else
         Output.Instance.Log("char", "Bot not running.");
 }
Example #2
0
 //public PlayerState State
 //{
 //    get { return stateManager.State; }
 //}
 protected void InitThreadObj()
 {
     workerThread = new GThread {Name = "BotManagerThread"};
     workerThread.OnRun += OnRun;
     workerThread.OnException += OnException;
     workerThread.OnInitialize += OnInitialize;
     workerThread.OnBeforeStart += OnBeforeStart;
     workerThread.OnBeforeStop += OnBeforeStop;
     workerThread.OnFinalize += OnFinalize;
     workerThread.OnInit += InitConfigParams;
 }
Example #3
0
 /// <summary>
 /// Constructor
 /// </summary>
 public BotManager()
 {
     //stateManager = StateManager.Instance;
     //stateManager.Init();
     workerThread = null;
 }
Example #4
0
 private void OnException(Exception e, GThread.ThreadPhase phase)
 {
     //Output.Instance.LogError(e);
     Console.WriteLine(e.ToString());
 }