Skip to content

martinlindhe/phaser-easystar-ts

Repository files navigation

About

npm version

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

About

A phaser 2 plugin for using easystarjs path finding. Demo at https://martinlindhe.github.io/phaser-easystar-ts/

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published