Example #1
0
        public BotManager(BotRunner runner)
        {
            buffer       = new InvocationBuffer();
            reservedList = new List <VTankBot>();

            BotRunner         = runner;
            WaitTimeReconnect = 5000;

            BotRunner.OnCrash += new BotRunner.Disconnect((bot) =>
            {
                buffer.Enqueue(new Invocation.InvocationTarget(HandleCrash),
                               bot, WaitTimeReconnect);
            });

            BotRunner.OnBotStateChange += new BotRunner.BotStateChange(BotRunner_OnBotStateChange);
            needsBalance = false;
        }
Example #2
0
        public BotManager(BotRunner runner)
        {
            buffer = new InvocationBuffer();
            reservedList = new List<VTankBot>();

            BotRunner = runner;
            WaitTimeReconnect = 5000;

            BotRunner.OnCrash += new BotRunner.Disconnect((bot) =>
            {
                buffer.Enqueue(new Invocation.InvocationTarget(HandleCrash),
                    bot, WaitTimeReconnect);
            });

            BotRunner.OnBotStateChange += new BotRunner.BotStateChange(BotRunner_OnBotStateChange);
            needsBalance = false;
        }