public void SetPath(MapAStar.PATH path) { if (path != null && path.success && path.nodes.Count > 0) { _hasPath = true; this._path = path; _mapGrid.AddPath(path); List <COORD> coords = CalcTargetTileCenter(); SetPathLineTiles(coords); } else { _hasPath = false; this._path = null; SetPathLineTiles(null); } }