phaser-easystar-ts
TypeScript icon, indicating that this package has built-in type declarations

0.2.1 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i phaser-easystar-ts

Weekly Downloads

0

Version

0.2.1

License

MIT

Unpacked Size

30.9 kB

Total Files

78

Last publish

Collaborators

  • martinlindhe