CreateRoom

Name

CreateRoom - Creates a new room where other players can join. Once the room is created, the player is automatically added to it.

Synopsis

Namespace: LoadBalancer.Client.Game

public async Task<CreateRoomResult> CreateRoom(CreateRoomParameters parameters)

Parameters

CreateRoomParameters consists of the following parameters:

  • RoomId string - The unique identifier of the room which distiguishes it from other rooms on the server.
  • RoomProperties KeyValueCollection - A collection of key-value pairs containing the room properties.
  • PlayerId string - The unique identifier of the player.
  • PlayerProperties KeyValueCollection - A collection of key-value pairs containing the player properties.
  • RoomObjects Object[] - An array containing objects loaded into the room scene.

Return Value

The CreateRoomResult, containing the created room properties:

  • RoomId string - The unique identifier of the created room.
  • RoomProperties KeyValueCollection - A collection of key-value pairs containing the room properties.
  • PlayerId string - The unique identifier of the player who created the room.
  • PlayerProperties KeyValueCollection - A collection of key-value pairs containing the player properties who created the room.
  • RoomObjects Object[] - An array containing objects loaded into the room scene.