Class: Player

Player(playerId, playerName, playerAvatar, playerIndex)

Class representing the Player.

Constructor

new Player(playerId, playerName, playerAvatar, playerIndex)

Parameters:
Name Type Description
playerId string

unique player id assigned once the connection is established using uuid package

playerName string

name of the player sat by the client on JoinRoomRequest or the CreateRoomRequest

playerAvatar integer

the avatar of the player sat by the client on JoinRoomRequest or the CreateRoomRequest

playerIndex integer

the order of the player in the room

Source:

Methods

setPlayerUDPPort(udpReceivePort)

Parameters:
Name Type Description
udpReceivePort integer

the udp receive port to be assigned to the player

Source: