Пример #1
0
        public void TestTileIndexesCorrect()
        {
            ServerMap map = AssetLoader.LoadMapFromFile();

            var chunk0 = map.GetChunkByChunkPosition(0, 0);
            var chunk1 = map.GetChunkByChunkPosition(1, 0);

            Assert.That(chunk0.Tiles[0, 0].Position.X == 0);
            Assert.That(chunk1.Tiles[0, 0].Position.X == 16);
        }
Пример #2
0
        public void TestMapLoadTestMap()
        {
            ServerMap map = AssetLoader.LoadMapFromFile("test_map");

            Assert.That(map.Chunks.Count >= 2);

            Chunk chunk = map.GetChunkByChunkPosition(0, 0);

            Assert.AreEqual(chunk.Tiles[0, 0].TileId, 1);
            Assert.AreEqual(chunk.Tiles[1, 0].TileId, 1);
            Assert.AreEqual(chunk.Tiles[2, 0].TileId, 1);

            chunk = map.GetChunkByChunkPosition(0, 0);
        }