Interface CharacterDataHeadless

Configuration object used to initialize a new character in GridEngine.

interface CharacterDataHeadless {
    charLayer?: string;
    collides?: boolean | CollisionConfig;
    facingDirection?: Direction;
    id: string;
    labels?: string[];
    numberOfDirections?: NumberOfDirections;
    speed?: number;
    startPosition?: Position;
    tileHeight?: number;
    tileWidth?: number;
}

Hierarchy (View Summary)

Properties

charLayer?: string

Sets the character layer of the character. If omitted the lowest character layer of the tilemap is taken. If there are no character layers in the tilemap, it will get the char layer undefined.

collides?: boolean | CollisionConfig

Set to false, if character should not collide (neither with the tilemap, nor with other characters). For more control, pass a CollisionConfig object.

true

facingDirection?: Direction

Sets the direction the character is initially facing.

Direction.DOWN

id: string

A unique identifier for the character on the map. If you provice two characters with the same id, the last one will override the previous one.

labels?: string[]

Sets labels for the character. They can be used to filter and logically group characters.

[]

numberOfDirections?: NumberOfDirections

The possible number of directions for moving a character. This setting can be used to override the global setting in the GridEngine configuration for specific characters.

speed?: number

The speed of a player in tiles per second.

4

startPosition?: Position

Start tile position of the player.

{x: 0, y:0}

tileHeight?: number

Height of the character in tiles. This allows to specify character that span more than just one tile.

1
tileWidth?: number

With of the character in tiles. This allows to specify character that span more than just one tile.

1
MMNEPVFCICPMFPCPTTAAATR