Skip to content
On this page

Create Client

  • Method: createClient()
  • Return: Promise
  • Usage:

Allows you to create a client and get fixtures to manipulate it during tests

Returns:

ts
{
     client: RpgClientEngine,
     socket: any,
     playerId: string
     player: RpgPlayer
}

Add Other Client In Map

  • Since: 3.2.0
  • Method: addOtherClientInMap(firstClient,mapId,position?)
  • Arguments:
    • { RpgClientEngine} firstClient. (Optional: false)
    • {string} mapId. (Optional: false)
    • {Position | string} position. (Optional: true)
  • Return: Promise
  • Usage:

Create another client, add it to the map and send the information to the first client


server

Get server


Change Map

  • Method: changeMap(client,mapId,position?)
  • Arguments:
    • { RpgClientEngine} client. (Optional: false)
    • {string} mapId. (Optional: false)
    • {Position | string} position. (Optional: true)
  • Return: Promise
  • Usage:

Allows you to change the map. This function on the tests also allows to render with PIXI on the client side