how to build each level's grid
Optionalapp: Application
the application, if not the last one initialized
a reference to the app/game that registered this plugin
the current level's grid, or null before a level is loaded
define the minimum required version of melonJS this can be overridden by the plugin
stop following level loads
build the grid of the current level again: after the map changed in a way the grid did not see
the new grid, or null with no level, no such layer, or a
build that returned null. Built from the collision shapes, it covers
the whole level: on an infinite map, from its first painted column
and row, which can be left of or above the map's origin.
Keeps a pathfinding Grid for the current level: built when a level is loaded, from a tile layer or from the level's collision shapes, and replaced by the next level's.
It is only a convenience for games whose grid comes from the level: a Grid works on its own.
Example