game-common / pragma.matchmaking / GameInstanceUpdate /

GameInstanceUpdate #

class GameInstanceUpdate(requestExt: ExtBackendAddPlayersRequest = ExtBackendAddPlayersRequest.getDefaultInstance())

A GameInstanceUpdate represents an update to an active game instance that is searching for more players by triggering the GameInstancePlugin.handleBackendAddPlayersRequest plugin method. A GameInstanceUpdate should be constructed and returned from the MatchmakingPlugin.matchPartiesWithGame plugin method.

Constructors #

GameInstanceUpdate

fun GameInstanceUpdate(requestExt: ExtBackendAddPlayersRequest = ExtBackendAddPlayersRequest.getDefaultInstance())

Functions #

NameSummary

addParties

fun addParties(parties: List<Matchmaking.Party>, teamNumber: Int = 0)

Select parties that should be added to the game instance.

setExtForPlayer

fun setExtForPlayer(player: Matchmaking.Player, ext: ExtBackendAddPlayer)

Set the ext for a player.

setExtGamePlayer

fun setExtGamePlayer(player: Matchmaking.Player, ext: ExtGamePlayer)

DEPRECATED in version 0.5.0, removal by 0.6.0. Use GameInstanceUpdate.setExtForPlayer instead.

setTeamByPlayers

fun setTeamByPlayers(players: List<Matchmaking.Player>, teamNumber: Int)

Set the team number on some players.

stopMatchmaking

fun stopMatchmaking()

Indicate that the game instance should be removed from matchmaking after this update is processed.

Properties #

NameSummary

markedToContinueMatchmaking

val markedToContinueMatchmaking: Boolean

Calculated as true if GameInstanceUpdate.stopMatchmaking has not been called.

players

val players: List<Matchmaking.Player>

The list of players in the GameInstanceUpdate. List is copied when retrieved.