public static ProblemSales Import(string filePath) { StreamReader reader = new StreamReader(filePath); string json = reader.ReadToEnd(); reader.Close(); ProblemSales map = JsonUtility.FromJson <ProblemSales>(json); map.read_polygons(json); return(map); }
// Use this for initialization void Start() { problem = ProblemSales.Import(problemPath); bois = new List <MotionModelSalesBoi>(); points = new List <GameObject>(); spawnObjects(); som = new SOM(problem.pointsOfInterest, problem.startPositions, problem.goalPositions); List <float[]> interestings = new List <float[]>(); interestings.AddRange(problem.pointsOfInterest); interestings.AddRange(problem.goalPositions); interestings.AddRange(problem.startPositions); vGraph = new VisibilityGraph(problem.obstacles, interestings); cooldown = waitTime; som.drawState(cooldown); Debug.Break(); }