game-common / pragma.matchmaking / GameInstanceUpdate /

GameInstanceUpdate #

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

Represents an update to an active game instance that is in matchmaking when returned from MatchmakingPlugin.matchPartiesWithGame. It will result in players being added to the active game instance and/or the game instance being removed from matchmaking.

Constructors #

GameInstanceUpdate

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

Functions #

NameSummary

addParties

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

Add multiple parties to the GameInstanceUpdate. Always sets the team number of all players within all parties, defaulted to 0.

setExtForPlayer

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

Set the ext for a player to be sent to the game instance.

setExtGamePlayer

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

Update the ExtGamePlayer payload for a given player in the game instance update. This data will be set on the GameInstance for the specified player.

setTeamByPlayers

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

Update multiple players’ team number.

stopMatchmaking

fun stopMatchmaking()

Indicate that after this GameInstanceUpdate is processed, the game instance should stop looking for players.

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.