Ejemplo n.º 1
0
        public void CrossingTest()
        {
            MpqManager.Initialize("S:\\WoW");
            byte[] dataA, dataB;

            // Build tile A
            {
                var builder = new TileBuilder("Azeroth", 31, 49);
                dataA = builder.Build(new ConsoleLog());
                Assert.IsNotNull(dataA);
            }

            // Build tile B
            {
                var builder = new TileBuilder("Azeroth", 32, 49);
                dataB = builder.Build(new ConsoleLog());
                Assert.IsNotNull(dataB);
            }

            // Load into mesh
            var pather = new Pather("Azeroth");

            Assert.IsTrue(pather.LoadTile(dataA));
            Assert.IsTrue(pather.LoadTile(dataB));

            // and try pathing, coords from AzerothMeshTest -> TileCrossing which is a non-building version of this
            var start = new Vector3(-9467.8f, 64.2f, 55.9f);
            var end   = new Vector3(-9248.9f, -93.35f, 70.3f);
            var path  = pather.FindPath(start, end);

            // check result
            Assert.IsNotNull(path);
            Assert.Greater(path.Count, 0);
            Assert.Less((end - path[path.Count - 1].Location).Length(), 3f);
        }
Ejemplo n.º 2
0
        public void FlightmasterTest()
        {
            var builder = new TileBuilder("Azeroth", 36, 49);

            builder.PrepareData(new ConsoleLog());
            builder.Build();
        }
Ejemplo n.º 3
0
        public void FlightmasterTest()
        {
            MpqManager.Initialize("S:\\WoW");

            var builder = new TileBuilder("Azeroth", 36, 49);

            builder.Build(new ConsoleLog());
        }
Ejemplo n.º 4
0
 public MainForm()
 {
     InitializeComponent();
     Game.State          = new GameState();
     Game.CarsController = new CarsController();
     CityBuilder.Create();
     TileBuilder.Build();
 }