game-common / pragma.gameinstance / GameInstancePlugin / handleBackendAddPlayersRequest /

handleBackendAddPlayersRequest #

open suspend fun handleBackendAddPlayersRequest(gameInstanceSnapshot: GameInstance.GameInstance, requestExt: ExtBackendAddPlayersRequest, playersToAdd: Map<<ERROR CLASS>, ExtBackendAddPlayer>)

Called when receiving a backend request to add players to a game instance.

Add the players to the game instance using the GameInstance.GameInstance.addPlayer method.

Default implementation: adds the players to the game instance.

Parameters #

gameInstanceSnapshot

The game instance to add players into.

requestExt

The data sent along with the request.

playersToAdd

A map of player ids to ext data for each player to add to the game instance.