GPGRealTimeRoomViewController Class Reference

GPGRealTimeRoomViewController Class Reference

Overview

The GPGRealTimeRoomViewController class provides a standard user interface for users to invite friends to a real-time room.

Public Member Functions

(id) - initWithMinPlayers:maxPlayers:exclusiveBitMask:variant:
 Initiate the view controller and show a player picker for users to pick friends to play and start a real-time room automatically.
(id) - initWithMinPlayers:maxPlayers:
 Initiate the view controller and show a player picker for users to pick friends to play and start a real-time room automatically.
(id) - initAndCreateRoomWithConfig:
 Initiate the view controller by passing in a config including invited player IDs and other match config values directly.
(id) - initWithRoomDataList:
 Initializes a real-time room view controller to create a new room with a list of GPGRealTimeRoomData

Properties

int minPlayers
 The minimum number of players to create the room.
int maxPlayers
 The maximum number of players to create the room.

Member Function Documentation

- (id) initWithMinPlayers: (int)  minPlayers
maxPlayers: (int)  maxPlayers
exclusiveBitMask: (uint64_t)  exclusiveBitMask
variant: (int)  variant 

Initiate the view controller and show a player picker for users to pick friends to play and start a real-time room automatically.

Parameters:
minPlayersMinimum number of total players allowed, including local player. This cannot be smaller than kGPGRealTimeMinPlayers.
maxPlayersMaximum number of players allowed, including local player. This cannot be larger than kGPGRealTimeMaxPlayers.
exclusiveBitMaskA bitmask indicating when auto-matches are valid. When ANDed with other exclusive bitmasks, the result must be zero. Can be used to support exclusive roles within a game. If there are no exclusivity requirements for the game, this value should just be set to 0.
variantThe game variant used for auto-matching. Must be either a positive integer or kGPGMultiplayerVariantDefault if not desired.
Returns:
The GPGRealTimeRoomViewController instance created.
- (id) initWithMinPlayers: (int)  minPlayers
maxPlayers: (int)  maxPlayers 

Initiate the view controller and show a player picker for users to pick friends to play and start a real-time room automatically.

Parameters:
minPlayersMinimum number of players allowed. This cannot be smaller than kGPGRealTimeMinPlayers.
maxPlayersMaximum number of players allowed. This cannot be larger than kGPGRealTimeMaxPlayers.
Returns:
The GPGRealTimeRoomViewController instance created.

Initiate the view controller by passing in a config including invited player IDs and other match config values directly.

The view controller will use the config directly to create a real-time room and show a player waiting room UI while trying to establish a room.

Parameters:
configThe configuration for a new real-time room.
Returns:
The GPGRealTimeRoomViewController instance created.
- (id) initWithRoomDataList: (NSMutableArray *)  roomDataList

Initializes a real-time room view controller to create a new room with a list of GPGRealTimeRoomData

Parameters:
roomDataListA list of GPGRealTimeRoomData.
Returns:
The GPGRealTimeRoomViewController instance created.

Property Documentation

- (int) minPlayers [read, write, assign]

The minimum number of players to create the room.

- (int) maxPlayers [read, write, assign]

The maximum number of players to create the room.

Оставить отзыв о...

Текущей странице
Play Games Services for iOS
Play Games Services for iOS