コード例 #1
0
 private static ReplayFile LoadReplayFile([CallerMemberName] string testName = null)
 {
     using (var fileSystem = new DiskFileSystem(Path.Combine(Environment.CurrentDirectory, "Data", "Rep", "Assets")))
     {
         var entry = fileSystem.GetFile(testName + ".rep");
         return(ReplayFile.FromFileSystemEntry(entry));
     }
 }
コード例 #2
0
        private RoadTopology LoadTopologyFromMapFile([CallerMemberName] string mapName = "")
        {
            var fileSystem = new DiskFileSystem(Path.Combine(Environment.CurrentDirectory, "Terrain", "Roads", "RoadAlignmentTests"));
            var mapFile    = MapFile.FromFileSystemEntry(fileSystem.GetFile(mapName + ".map"));

            var topology = RoadTopologyLoader.FromMapObjects(mapFile.ObjectsList.Objects);

            topology.AlignOrientation();

            return(topology);
        }