/// <summary> /// Constructs a VTankBot. /// </summary> /// <param name="runner">Parent bot runner.</param> /// <param name="server">Target Echelon server.</param> /// <param name="auth">Authentication information.</param> public VTankBot(BotRunner runner, TargetServer server, AuthInfo auth) { BotRunner = runner; ServerAddress = server; AuthInfo = auth; Game = new GameTracker(this); buffer = new EventBuffer(); CreateMasterCommunicator(); }
public void Dispose() { Shutdown(); if (buffer != null) { IEvent[] events = buffer.PopAll(); if (events != null && events.Length > 0) { foreach (IEvent evt in events) { evt.Dispose(); } } } BotRunner = null; clientCallback = null; clockCallback = null; buffer = null; Game = null; Player = null; }
/// <summary> /// Constructs the client interface. /// </summary> /// <param name="runner">Runner running this bot.</param> /// <param name="bot">Bot which will receive events.</param> public ClientI(BotRunner runner, VTankBot bot, EventBuffer buffer) { BotRunner = runner; Bot = bot; this.buffer = buffer; }