Class ROT.Path
Abstract pathfinder
Defined in: <rot.js>.
Constructor Attributes | Constructor Name and Description |
---|---|
ROT.Path(toX, toY, passableCallback, options)
|
Method Attributes | Method Name and Description |
---|---|
compute(fromX, fromY, callback)
Compute a path from a given point
|
Class Detail
ROT.Path(toX, toY, passableCallback, options)
- Parameters:
- {int} toX
- Target X coord
- {int} toY
- Target Y coord
- {function} passableCallback
- Callback to determine map passability
- {object} options Optional
- {int} options.topology Optional, Default: 8
Method Detail
compute(fromX, fromY, callback)
Compute a path from a given point
- Parameters:
- {int} fromX
- {int} fromY
- {function} callback
- Will be called for every path item with arguments "x" and "y"