コード例 #1
0
 // Use this for initialization
 void Start()
 {
     problem = ProblemSoccer.Import(problemPath, trajPath);
     players = new List <MotionModelSoccer>();
     spawnObjects();
     VC = new VirtualConstructSoccer(problem.formationPositions, playerHeight, boundingMinX, boundingMaxX, boundingMinZ, boundingMaxZ);
 }
コード例 #2
0
    public static ProblemSoccer Import(string filePath, string trajectoryPath)
    {
        StreamReader reader = new StreamReader(filePath);
        string       json   = reader.ReadToEnd();

        reader.Close();
        reader = new StreamReader(trajectoryPath);
        string trajJson = reader.ReadToEnd();

        reader.Close();
        ProblemSoccer map = JsonUtility.FromJson <ProblemSoccer>(json);

        map.read_polygons(json);
        map.readTrajectory(trajJson);
        return(map);
    }