Appearance
Summary
Get Collision of shapes
- Since: 3.2.0
- Property:
shapes
- Type:
RpgShape[]
- Optional:
false
- Read Only
- Usage:
Recovers all the colliding shapes of the current player
Get Collision of tiles
- Since: 3.0.0-beta.4
- Property:
tiles
- Type:
TileInfo[]
- Optional:
false
- Read Only
- Usage:
Recovers all the colliding tiles of the current player
Get Collision of other players/events
- Since: 3.0.0-beta.4
- Property:
otherPlayersCollision
- Type:
RpgPlayer | RpgEvent)[]
- Optional:
false
- Read Only
- Usage:
Recovers all other players and events colliding with the current player's hitbox
Get Tile
- Since: 3.0.0-beta.4
- Method:
player.getTile(x,y,z?)
- Arguments:
- {
number
}x
. (Optional:false
) - {
number
}y
. (Optional:false
) - {
number
}z
. (Optional:true
)
- {
- Return:
object
- Usage:
Retrieves a tile and checks if the player has a collision
ts
const tileInfo = player.getTile(20, 30)
console.log(tileInfo)
Example of returns:
ts
{
tiles: [
{
id: 0,
terrain: [],
probability: null,
properties: [Object],
animations: [],
objectGroups: [],
image: null,
gid: 1
}
],
hasCollision: false,
isOverlay: undefined,
objectGroups: [],
isClimbable: undefined,
tileIndex: 93
}
Get Shapes
- Since: 3.0.0-beta.3
- Method:
player.getShapes()
- Return:
RpgShape[]
- Usage:
Returns all shapes assigned to this player