Name | Type | Default | Description |
---|---|---|---|
json |
Object | optional Json object describing the picture | |
kind |
Object | PictureKind.Pictures | optional The kind of picture |
Properties:
Name | Type | Description |
---|---|---|
kind |
PictureKind | The kind of picture |
name |
string | The picture name |
isBR |
boolean | Indicate if the picture is a BR (Basic Ressource) |
isDLC |
boolean | Indicate if the picture is a DLC |
jsonCollisions |
Array.<number> | The json used for the picture collision |
collisionsRepeat |
boolean | Indicate if collision is repeated (for characters) |
collisions |
Array.<CollisionSquare> | The collisions squares |
Members
-
Get the folder associated to a kind of picture
-
Get the local folder associated to a kind of picture
Methods
-
Read the JSON associated to the picture
Name Type Description json
Object Json object describing the picture -
Read the JSON associated to the picture
-
Get the absolute path associated to this picture
Returns:
Type Description string -
Read collisions according to image size
Name Type Description image
Image The image texture -
Read collisions, we assume that this.width and this.height had been edited
-
getCollisionAt (pos)CollisionSquare
-
Get a specific collision square according to texture
Name Type Description pos
Array.<number> Texture position Returns:
Type Description CollisionSquare -
getCollisionAtPos (x, y)CollisionSquare
-
Get a specific collision square according to texture
Name Type Description x
number Texture x position y
number Texture y position Returns:
Type Description CollisionSquare -
getCollisionAtIndex (index)CollisionSquare
-
Get a specific collision square according to index
Name Type Description index
number The index positions Returns:
Type Description CollisionSquare -
Get a specific collision for wall
Name Type Description texture
Array.<number> Texture position Returns:
Type Description Array.<Array.<number>> -
Get a specific collision square according to texture
Name Type Description texture
Array.<number> Texture position Returns:
Type Description Array.<Array.<number>> -
Get a specific collision square according to texture
Name Type Description image
Image The image texture Returns:
Type Description Array.<Array.<Array.<number>>>