private static void Main(string[] args) { var bot = new BotBitsClient(); // Events EventLoader .Of(bot) .LoadStatic <Program>(); // Commands CommandsExtension.LoadInto(bot, '!', '.'); CommandLoader .Of(bot) .LoadStatic <Program>(); // Login Login.Of(bot) .AsGuest() .CreateJoinRoom("PW01"); // Console commands while (true) { CommandManager.Of(bot).ReadNextConsoleCommand(); } }
public ScannerWindow(BotBitsClient client) { InitializeComponent(); this.client = client; EventLoader.Of(client).Load(this); }
private static void Main() { EventLoader.Of(bot).LoadStatic <Program>(); Login.Of(bot).AsGuest().CreateJoinRoom("PW01"); Thread.Sleep(Timeout.Infinite); }
/// <summary> /// Sets the BotBits client. /// </summary> /// <param name="c">The client.</param> public static void BindClient(BotBitsClient c) { if (client != null) { return; } client = c; EventLoader.Of(c).LoadStatic <ConsoleAwesome>(); }
private static void Main() { EventLoader .Of(bot) .LoadStatic <Program>(); ConnectionManager .Of(bot) .GuestLogin() .CreateJoinRoom("PW01"); Thread.Sleep(Timeout.Infinite); }
public void EventLoadTest() { var botBits = new BotBitsClient(); EventLoader .Of(botBits) .Load(this); Assert.IsTrue( TestEvent .Of(botBits) .Contains(this.OnTest)); }
public void EventLoadStaticTest() { var botBits = new BotBitsClient(); EventLoader .Of(botBits) .LoadStatic <EventLoaderTests>(); Assert.IsTrue( TestEvent .Of(botBits) .Contains(OnStaticTest)); }
protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); var client = new BotBitsClient(); EventLoader.Of(client).Load(this); loginWindow = new LoginWindow(client); loginWindow.Show(); scannerWindow = new ScannerWindow(client); }
public BlocksAreaDictionary(IBlockAreaEnumerable blockArea, BotBitsClient client, IBlockFilter filter) { this._client = client; this._blockArea = blockArea; var fgGen = new ForegroundDictionaryLayerGenerator <BlocksItem>((p, b) => this._blockArea.At(p.X, p.Y)); var bgGen = new BackgroundDictionaryLayerGenerator <BlocksItem>((p, b) => this._blockArea.At(p.X, p.Y)); this.InternalForeground = new DictionaryBlockLayer <Foreground.Id, ForegroundBlock, BlocksItem, PointSet>(fgGen, filter); this.InternalBackground = new DictionaryBlockLayer <Background.Id, BackgroundBlock, BlocksItem, PointSet>(bgGen, filter); this.Reindex(); EventLoader.Of(this._client).Load(this); }
private static void Main(string[] args) { var bot = new BotBitsClient(); // Dictionary BlocksDictionaryExtension.LoadInto(bot); // Events EventLoader .Of(bot) .LoadStatic <Program>(); // Login Login.Of(bot) .AsGuest() .CreateJoinRoom("PW01"); Console.WriteLine($"This world contains {BlocksDictionary.Of(bot)[Foreground.Coin.GoldDoor].Count} gold coin doors."); }
public Scanner() { using (var r = new StreamReader("Login.txt")) { var email = r.ReadLine().Trim(); var password = r.ReadLine().Trim(); var worldId = r.ReadLine().Trim(); var dimensions = r.ReadLine().Trim().Split('x'); var width = int.Parse(dimensions[0]); var height = int.Parse(dimensions[1]); EventLoader.Of(bot).Load(this); MapManagerExtension.LoadInto(bot, width, height); Login.Of(bot) .WithEmail(email, password) .CreateJoinRoom(worldId); } }
private void EventListenerPackage_InitializeFinish(object sender, System.EventArgs e) { EventLoader .Of(this.BotBits) .Load(this); }
public void Dispose() { EventLoader.Of(this._client).Unload(this); }