Photon Server API
Classes | Public Member Functions | Public Attributes | Properties | List of all members
Photon.LoadBalancing.MasterServer.Lobby.GameState Class Reference

Classes

class  ExpiryInfo
 

Public Member Functions

 GameState (AppLobby lobby, string id, byte maxPlayer, IncomingGameServerPeer gameServerPeer)
 Initializes a new instance of the GameState class. More...
 
 GameState (AppLobby lobby, Hashtable data)
 
void AddPeer (ILobbyPeer peer)
 
void CheckJoinTimeOuts (DateTime minDateTime)
 
void ResetGameServer ()
 
string GetServerAddress (ILobbyPeer peer)
 
bool MatchGameProperties (Hashtable matchProperties)
 
Hashtable ToHashTable ()
 
bool TrySetProperties (Hashtable gameProperties, out bool changed, out string debugMessage)
 
bool Update (UpdateGameEvent updateOperation)
 
void OnRemoved ()
 
override string ToString ()
 
Hashtable GetRedisData ()
 
bool ContainsUser (string userId)
 
bool IsUserInExcludeList (string userId)
 
bool IsUserExpected (string userId)
 
bool CheckSlots (string userId, string[] expectedUsers)
 
bool CheckSlots (string userId, string[] expectedUsers, out string errMsg)
 
void AddSlots (JoinGameRequest request)
 

Public Attributes

readonly AppLobby Lobby
 
const byte GameId = 0
 
const byte InactiveCountId = 1
 
const byte CreateDateId = 2
 
const byte UserListId = 3
 
const byte PropertiesId = 4
 
const byte IsVisibleId = 5
 
const byte IsOpenId = 6
 
const byte MaxPlayerId = 7
 
const byte LobbyNameId = 8
 
const byte LobbyTypeId = 9
 
const byte InactiveUsersId = 10
 
const byte ExcludedUsersId = 11
 
const byte ExpectedUsersId = 12
 

Properties

DateTime CreateDateUtc [get]
 
IncomingGameServerPeer GameServer [get]
 Gets the address of the game server on which the game is or should be created. More...
 
int GameServerPlayerCount [get]
 Gets the number of players who joined the game on the game server. More...
 
string Id [get]
 Gets the game id. More...
 
int InactivePlayerCount [get, set]
 
bool HasBeenCreatedOnGameServer [get, set]
 Gets or sets a value indicating whether the game is created on a game server instance. More...
 
bool IsOpen [get, set]
 Gets or sets a value indicating whether the game is open for players to join the game. More...
 
bool IsPersistent [get, set]
 
bool IsVisbleInLobby [get]
 Gets a value indicating whether this instance is visble in the lobby. More...
 
bool IsVisible [get, set]
 Gets or sets a value indicating whether the game should be visible to other players. More...
 
int JoiningPlayerCount [get]
 Gets the number of players currently joining the game. More...
 
int MaxPlayer [get, set]
 Gets or sets the maximum number of player for the game. More...
 
int PlayerCount [get]
 Gets the number of players joined the game. More...
 
int YetExpectedUsersCount [get]
 
Dictionary< object, object > Properties [get]
 
bool IsJoinable [get]
 
bool ShouldBePreservedInList [get]
 
bool CheckUserIdOnJoin [get]
 
List< ExcludedActorInfo > ExcludedActors [get]
 

Constructor & Destructor Documentation

Photon.LoadBalancing.MasterServer.Lobby.GameState.GameState ( AppLobby  lobby,
string  id,
byte  maxPlayer,
IncomingGameServerPeer  gameServerPeer 
)
inline

Initializes a new instance of the GameState class.

Parameters
lobbyThe lobby to which the game belongs.
idThe game id.
maxPlayerThe maximum number of player who can join the game.
gameServerPeerThe game server peer.
Photon.LoadBalancing.MasterServer.Lobby.GameState.GameState ( AppLobby  lobby,
Hashtable  data 
)
inline

Member Function Documentation

void Photon.LoadBalancing.MasterServer.Lobby.GameState.AddPeer ( ILobbyPeer  peer)
inline
void Photon.LoadBalancing.MasterServer.Lobby.GameState.AddSlots ( JoinGameRequest  request)
inline
void Photon.LoadBalancing.MasterServer.Lobby.GameState.CheckJoinTimeOuts ( DateTime  minDateTime)
inline
bool Photon.LoadBalancing.MasterServer.Lobby.GameState.CheckSlots ( string  userId,
string[]  expectedUsers 
)
inline
bool Photon.LoadBalancing.MasterServer.Lobby.GameState.CheckSlots ( string  userId,
string[]  expectedUsers,
out string  errMsg 
)
inline
bool Photon.LoadBalancing.MasterServer.Lobby.GameState.ContainsUser ( string  userId)
inline
Hashtable Photon.LoadBalancing.MasterServer.Lobby.GameState.GetRedisData ( )
inline
string Photon.LoadBalancing.MasterServer.Lobby.GameState.GetServerAddress ( ILobbyPeer  peer)
inline
bool Photon.LoadBalancing.MasterServer.Lobby.GameState.IsUserExpected ( string  userId)
inline
bool Photon.LoadBalancing.MasterServer.Lobby.GameState.IsUserInExcludeList ( string  userId)
inline
bool Photon.LoadBalancing.MasterServer.Lobby.GameState.MatchGameProperties ( Hashtable  matchProperties)
inline
void Photon.LoadBalancing.MasterServer.Lobby.GameState.OnRemoved ( )
inline
void Photon.LoadBalancing.MasterServer.Lobby.GameState.ResetGameServer ( )
inline
Hashtable Photon.LoadBalancing.MasterServer.Lobby.GameState.ToHashTable ( )
inline
override string Photon.LoadBalancing.MasterServer.Lobby.GameState.ToString ( )
inline
bool Photon.LoadBalancing.MasterServer.Lobby.GameState.TrySetProperties ( Hashtable  gameProperties,
out bool  changed,
out string  debugMessage 
)
inline
bool Photon.LoadBalancing.MasterServer.Lobby.GameState.Update ( UpdateGameEvent  updateOperation)
inline

Member Data Documentation

const byte Photon.LoadBalancing.MasterServer.Lobby.GameState.CreateDateId = 2
const byte Photon.LoadBalancing.MasterServer.Lobby.GameState.ExcludedUsersId = 11
const byte Photon.LoadBalancing.MasterServer.Lobby.GameState.ExpectedUsersId = 12
const byte Photon.LoadBalancing.MasterServer.Lobby.GameState.GameId = 0
const byte Photon.LoadBalancing.MasterServer.Lobby.GameState.InactiveCountId = 1
const byte Photon.LoadBalancing.MasterServer.Lobby.GameState.InactiveUsersId = 10
const byte Photon.LoadBalancing.MasterServer.Lobby.GameState.IsOpenId = 6
const byte Photon.LoadBalancing.MasterServer.Lobby.GameState.IsVisibleId = 5
readonly AppLobby Photon.LoadBalancing.MasterServer.Lobby.GameState.Lobby
const byte Photon.LoadBalancing.MasterServer.Lobby.GameState.LobbyNameId = 8
const byte Photon.LoadBalancing.MasterServer.Lobby.GameState.LobbyTypeId = 9
const byte Photon.LoadBalancing.MasterServer.Lobby.GameState.MaxPlayerId = 7
const byte Photon.LoadBalancing.MasterServer.Lobby.GameState.PropertiesId = 4
const byte Photon.LoadBalancing.MasterServer.Lobby.GameState.UserListId = 3

Property Documentation

bool Photon.LoadBalancing.MasterServer.Lobby.GameState.CheckUserIdOnJoin
get
DateTime Photon.LoadBalancing.MasterServer.Lobby.GameState.CreateDateUtc
get
List<ExcludedActorInfo> Photon.LoadBalancing.MasterServer.Lobby.GameState.ExcludedActors
get
IncomingGameServerPeer Photon.LoadBalancing.MasterServer.Lobby.GameState.GameServer
get

Gets the address of the game server on which the game is or should be created.

int Photon.LoadBalancing.MasterServer.Lobby.GameState.GameServerPlayerCount
get

Gets the number of players who joined the game on the game server.

bool Photon.LoadBalancing.MasterServer.Lobby.GameState.HasBeenCreatedOnGameServer
getset

Gets or sets a value indicating whether the game is created on a game server instance.

true if this instance is created on game server; otherwise, false.

string Photon.LoadBalancing.MasterServer.Lobby.GameState.Id
get

Gets the game id.

int Photon.LoadBalancing.MasterServer.Lobby.GameState.InactivePlayerCount
getset
bool Photon.LoadBalancing.MasterServer.Lobby.GameState.IsJoinable
get
bool Photon.LoadBalancing.MasterServer.Lobby.GameState.IsOpen
getset

Gets or sets a value indicating whether the game is open for players to join the game.

true if the game is open; otherwise, false.

bool Photon.LoadBalancing.MasterServer.Lobby.GameState.IsPersistent
getset
bool Photon.LoadBalancing.MasterServer.Lobby.GameState.IsVisbleInLobby
get

Gets a value indicating whether this instance is visble in the lobby.

true if this instance is visble in lobby; otherwise, false.

bool Photon.LoadBalancing.MasterServer.Lobby.GameState.IsVisible
getset

Gets or sets a value indicating whether the game should be visible to other players.

true if the game is visible; otherwise, false.

int Photon.LoadBalancing.MasterServer.Lobby.GameState.JoiningPlayerCount
get

Gets the number of players currently joining the game.

int Photon.LoadBalancing.MasterServer.Lobby.GameState.MaxPlayer
getset

Gets or sets the maximum number of player for the game.

int Photon.LoadBalancing.MasterServer.Lobby.GameState.PlayerCount
get

Gets the number of players joined the game.

Dictionary<object, object> Photon.LoadBalancing.MasterServer.Lobby.GameState.Properties
get
bool Photon.LoadBalancing.MasterServer.Lobby.GameState.ShouldBePreservedInList
get
int Photon.LoadBalancing.MasterServer.Lobby.GameState.YetExpectedUsersCount
get