game-common / pragma.matchmaking / NewGameInstance /

NewGameInstance #

class NewGameInstance(var ext: ExtGameInstance = ExtGameInstance.getDefaultInstance(), var requestExt: ExtBackendCreateRequest = ExtBackendCreateRequest.getDefaultInstance(), var gameServerZone: <ERROR CLASS>)

A NewGameInstance represents a successful matchmaking result that will be used to create a new game instance by triggering the GameInstancePlugin.handleBackendCreateRequest plugin method. A NewGameInstance should be constructed and returned from the MatchmakingPlugin.initialize or MatchmakingPlugin.matchParties plugin methods.

Constructors #

NewGameInstance

fun NewGameInstance(ext: ExtGameInstance = ExtGameInstance.getDefaultInstance(), requestExt: ExtBackendCreateRequest = ExtBackendCreateRequest.getDefaultInstance(), gameServerZone: <ERROR CLASS>)

Functions #

NameSummary

addParties

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

Select parties that should be added to the game instance.

continueMatchmaking

fun continueMatchmaking(key: MatchmakingRpc.MatchmakingQueueKey)

Indicate that after the game instance is created, it should be immediately be added into matchmaking to find more players.

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 setExtForPlayer instead.

setTeamByPlayers

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

Set the team number on some players.

Properties #

NameSummary

ext

var ext: ExtGameInstance

A customer-defined payload of extra game information that will be used to create the game instance.

gameServerZone

var gameServerZone: <ERROR CLASS>

A string id that indicates which game server zone that game will be created within.

markedToContinueMatchmaking

val markedToContinueMatchmaking: Boolean

Calculated as true if NewGameInstance.continueMatchmaking has been called.

matchmakingQueueKey

val matchmakingQueueKey: MatchmakingRpc.MatchmakingQueueKey

The key for the matchmaking queue that the game instance will be added to if NewGameInstance.continueMatchmaking is called.

players

val players: List<Matchmaking.Player>

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

requestExt

var requestExt: ExtBackendCreateRequest

A customer-defined payload of extra game information that will be used to create the game instance.