public List <Vector3I> PositionList = new List <Vector3I>(); //Vectors in this list are connected, but not neccessarily in a line #region Public Methods /// <summary> /// Sets a bot, as well as the bot values. Must be called before any other bot classes. /// </summary> public void setBot(String botName, World botWorld, Position pos, int entityID) { Name = botName; World = botWorld; Position = pos; ID = entityID; thread = Scheduler.NewTask(t => NetworkLoop()); thread.RunForever(TimeSpan.FromSeconds(0.1));//run the network loop every 0.1 seconds Server.Bots.Add(this); }
public static void CheckAutoRankSetting() { if( ConfigKey.AutoRankEnabled.GetBool() ) { if( task == null ) { task = Scheduler.NewBackgroundTask( TaskCallback ); task.RunForever( TickInterval ); } else if( task.IsStopped ) { task.RunForever( TickInterval ); } } else if( task != null && !task.IsStopped ) { task.Stop(); } }
public static void CheckAutoRankSetting() { if (ConfigKey.AutoRankEnabled.GetBool()) { if (task == null) { task = Scheduler.NewBackgroundTask(TaskCallback); task.RunForever(TickInterval); } else if (task.IsStopped) { task.RunForever(TickInterval); } } else if (task != null && !task.IsStopped) { task.Stop(); } }
/// <summary> /// Sets a bot, as well as the bot values. Must be called before any other bot classes. /// </summary> public void setBot(String botName, Level botWorld, Position pos, int entityID) { Name = botName; World = botWorld; Position = pos; ID = entityID; thread = Scheduler.NewTask(t => NetworkLoop()); thread.RunForever(TimeSpan.FromSeconds(0.1));//run the network loop every 0.1 seconds Server.Bots.Add(this); }