private PathDrawer GetPathDrawer(Cell cell)
 {
     if (!pathDrawers.ContainsKey(cell))
     {
         pathDrawers.Add(cell, PathManager.CreatePathDrawer());
     }
     return(pathDrawers[cell]);
 }
 void Start()
 {
     if (startCursorPrefab != null)
     {
         startCursorInstance = Instantiate <Transform>(startCursorPrefab, GridManager.GetCellPos(startCell), Quaternion.identity);
     }
     if (endCursorPrefab != null)
     {
         endCursorInstance = Instantiate <Transform>(endCursorPrefab, GridManager.GetCellPos(targetCell), Quaternion.identity);
     }
     previewPathDrawer = PathManager.CreatePathDrawer();
 }
    private void SetPathForCell(Cell cell, List <Cell> path)
    {
        if (!pathDrawers.ContainsKey(cell))
        {
            pathDrawers.Add(startCell, PathManager.CreatePathDrawer());
        }
        if (!paths.ContainsKey(cell))
        {
            paths.Add(cell, path);
        }

        pathDrawers[cell].DrawPath(path);
        paths[cell] = path;
    }