phaser-easystar-ts
v0.2.1
Published
[![npm version](https://badge.fury.io/js/phaser-easystar-ts.svg)](https://www.npmjs.com/package/phaser-easystar-ts)
Downloads
13
Readme
About
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.
Usage
See demo/Game.js for a javascript example.
Typescript usage
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);
}
License
Under MIT