BlueWorldParser

ClubCrawler.Parsers. BlueWorldParser

Parses the BlueWorld map found in static/maps/blueworld.json

Wraps and manages a Phaser.Tilemap, loads objects, applies physics to objects, and places player in the scene.

Will eventually handle loading of other maps.

Constructor

new BlueWorldParser(config)

Source:

Creates the map floor tiles, wall tiles, and spawns.

Parameters:
Name Type Description
config Object

A configuration object

Properties
Name Type Description
scene Phaser.Scene

The Phaser.Scene creating this map manager

Members

(static, constant) BLUEWORLD_DEFAULTS

Source:

Describes how each Tiled object is mapped to a javascript object or function.

map

Source:

The Phaser.Tilemaps.Tilemap for the current scene

scale

Source:
To Do:
  • Implement this
Properties:
Type Description
number

The amount to scale the map - not yet implemented

startX

Source:
Default Value:
  • 0

Player start X coordinates.

startY

Source:
Default Value:
  • 0

Player start Y coordinates.

Methods

addColliders() → {any}

Source:
Deprecated:
  • Yes

This will be improved so colliders can be defined in the mapping object as well.

Returns:
Type
any

placeMappedObjects() → {any}

Source:

Places objects according to the mappings

Returns:
Type
any

startPlayer(player)

Source:

Places player at this.startX, this.startY

Parameters:
Name Type Description
player Player

The player