Description

Map management and events on this one

Methods

transfer_player

Moves the player to a location on the map

passable

Checks if the next destination of the player is not fair. Returns an object with three values : - passable (boolean) If the tile is passable - x (integer) the length difference between the new position and not passable tile - y (integer) the difference of height between the new position and not passable tile

getEvent

Get an event on the map by its ID

updateEvents

Update events on the map. Called the `update` method in Game_Event

refreshEvents

Refresh events on the map. Refresh on the scene. Called the `refresh` method in Game_Event

refreshPlayer

Refresh player on the map. Refresh on the scene.

isAutotile

Checks whether the identifier of the tile is a autotile

getPropAutotile

Retrieves properties autotile by its ID

getPropTile

Retrieves properties tile by its ID

getSize

Map size (number of tiles)

getTileSize

Tile size. Returns an object : - width : Width of tile in pixels - height : Height of tile in pixels

tileToPixel

Transforms positions tile to real positions. Return an object - x : Position X in pixels - y : Position Y tile in pixels

loadEvent

Load event on the map. The event is then sent to the scene to display

addDynamicEvent

Load event on the map. The event is then sent to the scene to display

removeEvent

Delete an event in the map

callScene

Call a method on Scene_Map

Discussion