screep/path.js

8 lines
297 B
JavaScript
Raw Normal View History

2020-10-23 20:55:20 +08:00
module.exports = {
visualPath(my_pos, target_pos) {
// visualize the path
const path = PathFinder.search(my_pos, target_pos).path;
// console.log(path)
Game.map.visual.poly(path, { stroke: '#ffffff', strokeWidth: .8, opacity: .2, lineStyle: 'dashed' });
}
}