public Grid(int width, int height, GridHolder gridHolder, Vector2Int start, Vector2Int target) { m_Width = width; m_Height = height; m_GridHolder = gridHolder; m_StartCoordinate = start; m_TargetCoordinate = target; m_Nodes = new Node[m_Width, m_Height]; for (int i = 0; i < m_Nodes.GetLength(0); i++) { for (int j = 0; j < m_Nodes.GetLength(1); j++) { m_Nodes[i, j] = new Node(gridHolder.GetGridPosition(new Vector2Int(i, j))); } } m_Pathfinding = new Pathfinder(this, start, target); m_Pathfinding.UpdateField(); }
public GridRaycastController(GridHolder mGridHolder) { m_GridHolder = mGridHolder; }