Private _active_Private _background_Private _big_Private _bodies_Private _collision_Private _collision_Private _collision_Private _colorize_Private _current_Private _encounter_Private _eventsPrivate _generic_Private _gray_Private _interactable_Private _interactable_Private _internal_Private _is_Private _key_Private _lazy_Private _map_Private _mode7_Private _namePrivate _npcsPrivate _npcs_Private _pausedPrivate _processed_Private _retreat_Private _sand_Private _shapesPrivate _show_Private _show_Private _spritePrivate assets_Private before_Private before_Private bgm_Private bgm_Private bgm_Private bounding_Private collision_Private dataPrivate encounter_Private expected_Generic tween object to be used to transition this map filters.
Private gamePrivate game_Optional layer_Optional layer_Optional opacity?: numberOptional visibility?: booleanPrivate other_Private physics_Private physics_Private polygons_If true, sprites in middlelayer_group won't be sorted.
Private tileset_Private tileset_Static Private Readonly CAMERA_Static Private Readonly MAX_An object containing which filters are active in this char.
The battle background key of this map.
Gets the map collision body for current collision layer.
The current active collision layer.
The number of collision layers of this map.
The sprite without texture just responsible to enable the map collision body.
The Phaser.Filter object responsible for this map texture color control.
Gets the current bounding box object ID.
Gets the enemy party encounter cumulator value.
An object of generic sprites that can be created by Game Events.
The Phaser.Filter object responsible for this map saturation control.
The list of Interactable Objects of this map.
The object that holds the Interactable Objects of this map that have a label.
The internal storage keys created for objects of this map.
Whether this map is world map or not.
The map key name.
The list of layers of this map.
Whether this map will load its assets only when the hero reaches it.
The Phaser.Filter object responsible for this map mode7.
The map name.
Whether the map is paused or not.
Gets Retreat psynergy info. Returns the x and y tile posoition to retreat and the destination collision index and direction.
Gets the collision layer index that sand psynergy will use.
Whether this map has chars footprint system enabled.
Whether this map will show its name on teleport.
The map main sprite.
The tile height of this map.
The tile width of this map.
Adds a generic sprite to this map.
the generic sprite key name.
the x position in px.
the y position in px.
the Phaser.Group to be in.
Optional options: { some options.
Optional action?: stringThe animation action key.
Optional alpha?: numberThe sprite alpha value.
Optional anchor_The sprite ancho x value.
Optional anchor_The sprite ancho y value.
Optional animation?: stringThe animation key.
Optional collision_The collision layer that the sprite will be. Important when sorting sprites.
Optional frame?: stringThe frame key name to be set for this sprite.
Optional frame_The frame rate of the animation.
Optional loop?: booleanWhether the animation will loop.
Optional play?: booleanIf true, an animation of this sprite will be started.
Optional rotation?: numberThe sprite rotation value.
Optional scale_The sprite scale x value.
Optional scale_The sprite scale y value.
Optional send_If true, the sprite will be sorted under NPC layers.
returns the generated sprite.
Private bgm_Checks whether a NPC or Interactable object has its body on map.
the NPC or Interactable Object instance.
whether the body is in the map or not.
Private config_Private config_Initializes a single NPC in this map.
the npc to be initialized.
the map unique index of this interactable object.
Optional custom_pos: { an initial custom position for this npc in px.
Optional x?: numberOptional y?: numberPrivate config_Private create_Creates an interactable object.
the property name.
the properties of this interactable object still not parsed.
the map unique index of this interactable object.
returns the created interactable object.
Creates a NPC.
the property name.
the properties of this NPC, parsed or not.
whether the properties are parsed or not.
the map unique index of this NPC.
returns the created npc.
Private create_Fires this map game events.
the set type of map events that will be fired.
Get the tiles that a ControllableChar is over.
the ControllableChar.
Optional layer: any[]if this is not specified, it's returned all tiles for the char position.
returns a tile object: Phaser.Tile or Phaser.Tile[] if multiple layers.
Gets the zones that the hero is in. Zones are only available if hero is moving.
a Set of zones.
Private get_Creates a NPC representing the djinn to be gotten and a game event to get this djinn.
the djinn key to be gotten.
return the fire event function of the DjinnEvent instance created in this function.
Checks if a given tile position has IOs or NPCs, if yes return a list of them.
the x tile position.
the y tile position.
Optional collision_layer: numberthe collision layer of tile. If not passed, gets the current one.
Returns a list of NPCs and IOs based on constraints given.
Initializes game events of this map.
list of input events before parse.
the type of game event that's being intialized.
Optional property_key: stringthe property key name in case of "options_list" game event type.
Initializes internal storage keys with snapshot info.
the snapshot init object.
Checks if a given tile position is blocked by a collision object.
the x tile position.
the y tile position.
Optional collision_layer: numberthe collision layer of tile. If not passed, gets the current one.
if true, will also check for NPCs and IOs.
Returns whether the given position is blocked or not.
Sets or unsets a Phaser.Filter in this map.
the filter you want to set.
whether it's to set or unset the filter.
Optional layer: stringspecify a layer if you want that this filter management should be only for the given layer.
This is the main function of this class. It mounts the map.
the initial collision layer.
the initial encounter cumulator. If not passed, it's reset.
an object that holds the x and y tile positions that the hero will be.
Optional retreat_data: { retreat data that can be propagated from previous map if it has the same key name.
returns the mounted map.
Private parse_Pauses map activity, like collisions, npc and interactable objects animation etc.
return the current map state.
Private pre_Private process_Removes a NPC or an IO collision track from this map.
the NPC or IO instance.
Optional x_tile: numberthe x tile position.
Optional y_tile: numberthe y tile position.
Optional collision_layer: numberthe collision index.
Removes a NPC from this map.
the npc to be removed.
if true, will also unset the npc.
Resumes map activity, like collisions, npc and interactable objects animation etc.
Optional previous_state: { the map state when it was paused.
Sets whether a tile should collide or not. Only works if there's at least on collision body in the given tile position.
the x tile position.
the y tile position.
whether it should collide or not.
Optional collision_layer: numberthe collision layer of tile. If not passed, gets the current one.
Sets a storage key identifier for a NPC or Interactable Object in order to hold values internally if this map is unmounted.
is true, will set the key for a NPC, otherwise for an Interactable Object.
the storage key type.
the storage key.
the NPC or Interactable Object index in this map.
Checks what is the suitable bounding box for the given position. If no bounding box found, will fit map bounds to world size.
the x tile position.
the y tile position.
if true, will apply the bounds to camera.
Sorts the sprites in the GoldenSun.middlelayer_group by y position and base_collision_layer properties. After this first sort, send_to_front [boolean], sort_function [callable], send_to_back [boolean] and sort_function_end [callable] Phaser.DisplayObject properties are checked in this order.
Private start_Updates the new position of an IO or NPC in this map structure.
the old x tile position.
the old y tile position.
the new x tile position.
the new y tile position.
the old collision index.
the new collision index.
the NPC or IO instance.
Private update_Private zone_
The class reponsible for the maps of the engine.