Class: GameStageData

GameStageData

A storage for stage data, such as gameObjects, boundaries, worldDimensions and offset
Source:
See:

Members

boundariesLen :number

Tiled polygon and Tiled layer boundaries length
Source:

canvasDimensions :Array.<number>

Current canvas dimensions
Source:

ellipseBLen :number

Tiled ellipse boundaries length
Source:

isWorldBoundariesEnabled

Deprecated:
  • Yes
Source:

mapCenter :Array.<number>

Current focus point
Source:

mapRotate :number

Source:

pointBLen :number

Tiled point length
Source:

renderObjects

a getter to retrieve all attached renderObjects
Source:

worldDimensions :Array.<number>

Current game world dimensions
Source:

worldOffset :Array.<number>

Current word x/y offset
Source:

Methods

centerCameraPosition(x, y)

Parameters:
Name Type Description
x number
y number
Source:

getBoundaries() → {Array.<Array.<number>>}

current screen boundaries, this method is for backward capability with jsge@1.4.4 recommended to use getRawBoundaries()
Source:
Returns:
Type
Array.<Array.<number>>

getEllipseBoundaries() → {Float32Array}

ellipse boundaries from Tiled, stored as floatArray, each 4 cells, represent am ellipse with cords centerX, centerY, radiusX, radiusY
Source:
Returns:
Type
Float32Array

getObjectsByInstance(instance) → {Array.<Object>}

Retrieve specific objects instances
Parameters:
Name Type Description
instance Object drawObjectInstance to retrieve
Source:
Returns:
Type
Array.<Object>

getPointBoundaries() → {Float32Array}

point boundaries from Tiled, stored as floatArray, each 2 cells, represent a point with coords x1,y1
Source:
Returns:
Type
Float32Array

getRawBoundaries() → {Float32Array}

current screen boundaries polygon boundaries from Tiled and Tiled boundaries layers are merged here each 4 cells, represent a line with coords x1,y1,x2,y2
Source:
Returns:
Type
Float32Array

isOffsetTurnedOff() → {boolean}

Source:
Returns:
Type
boolean