예제 #1
0
    public void CreateGraphNode(WorldPath road)
    {
        GraphNode graphNode = new GraphNode
        {
            Road           = road,
            Visited        = false,
            RoadNeighbours = road.GetNeighbouringPaths(),
            Neighbours     = new List <GraphNode>()
        };

        nodes.Add(graphNode);

        if (nodes.Count == ROAD_COUNT)
        {
            CalculateNodeNeighbours();
        }
    }