示例#1
0
    public static void Main(string[] args)
    {
        BotDriver driver = new BotDriver(
            // Change this to configure the host this bot points to
            "localhost",
            // Change this to configure the port
            80,
            (state, playerName, playerId) => new MyBot(state, playerName, playerId)
            );

        Task runResult = driver.Run(
            // Change this to configure the name of the bot in the game
            "WindowsBot",
            // Change this to RunMode.Competition for bot to compete
            RunMode.Persistent
            );

        runResult.Wait();
        Console.WriteLine(runResult.Exception);
    }
示例#2
0
 private void Bot_onFall(BotDriver caller)
 {
     currentSpawnedVehicleCount--;
     caller.onFall -= Bot_onFall;
     BotCars.Return(caller.transform);
 }