setWalkableAt method
dynamic
setWalkableAt(
- dynamic x,
- dynamic y,
- dynamic walkable
Set whether the node on the given position is walkable. NOTE: throws exception if the coordinate is not inside the grid. @param {number} x - The x coordinate of the node. @param {number} y - The y coordinate of the node. @param {boolean} walkable - Whether the position is walkable.
Implementation
setWalkableAt(x, y, walkable) {
this.nodes[y][x].walkable = walkable;
}