text: Phaser.Plugin.PathFinderPlugin=function(t){if("object"!=typeof EasyStar)throw new Error("Easystar is not defined!");this.parent=t,this._easyStar=new EasyStar.js,this._grid=null,this._callback=null,this._prepared=!1,this._walkables=[0]},Phaser.Plugin.PathFinderPlugin.prototype=Object.create(Phaser.Plugin.prototype),Phaser.Plugin.PathFinderPlugin.prototype.constructor=Phaser.Plugin.PathFinderPlugin,Phaser.Plugin.PathFinderPlugin.prototype.setGrid=function(t,i,e){e=e||null,this._grid=[];for(var a=0;a<t.length;a++){this._grid[a]=[];for(var r=0;r<t[a].length;r++)this._grid[a][r]=t[a][r]?t[a][r].index:0}for(this._walkables=i,this._easyStar.setGrid(this._grid),this._easyStar.setAcceptableTiles(this._walkables),a=0;a<i.length;a++)this.setTileCost(i[a],1);null!==e&&this._easyStar.setIterationsPerCalculation(e)},Phaser.Plugin.PathFinderPlugin.prototype.setTileCost=function(t,i){this._easyStar.setTileCost(t,i)},Phaser.Plugin.PathFinderPlugin.prototype.preparePathCalculation=function(t,i,e){if(null===e||"function"!=typeof e)throw new Error("No Callback set!");var a=t[0],r=t[1],n=i[0],s=i[1];this._easyStar.findPath(a,r,n,s,e),this._prepared=!0},Phaser.Plugin.PathFinderPlugin.prototype.calculatePath=function(){if(null===this._prepared)throw new Error("no Calculation prepared!");this._easyStar.calculate()},Phaser.Plugin.PathFinderPlugin.prototype.enableDiagonals=function(){this._easyStar.enableDiagonals()},Phaser.Plugin.PathFinderPlugin.prototype.avoidAdditionalPoint=function(t,i){this._easyStar.avoidAdditionalPoint(t,i)};