A Phaser 2 plugin for using easystarjs path finding.
Please note that this plugin bundles easystarjs (currently 0.4.1), so you don't need to include that dependency.
Code based on https://github.com/appsbu-de/phaser_plugin_pathfinding
Try out demo here.
See demo/Game.js for a javascript example.
import PhaserEasystar from "phaser-easystar-ts";
function create() {
const map = game.add.tilemap('desert');
...
const pathfinder = new PhaserEasystar(game);
pathfinder.setGrid(map.layers[0].data, walkables);
}
Under MIT