Exemplo n.º 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.");
 }
Exemplo n.º 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;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Constructor
 /// </summary>
 public BotManager()
 {
     //stateManager = StateManager.Instance;
     //stateManager.Init();
     workerThread = null;
 }
Exemplo n.º 4
0
 private void OnException(Exception e, GThread.ThreadPhase phase)
 {
     //Output.Instance.LogError(e);
     Console.WriteLine(e.ToString());
 }