Photon Server API

Classes | Public Member Functions | Public Attributes | Static 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
 

Static Public Attributes

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

◆ GameState() [1/2]

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.

◆ GameState() [2/2]

Photon.LoadBalancing.MasterServer.Lobby.GameState.GameState ( AppLobby  lobby,
Hashtable  data 
)
inline

Member Function Documentation

◆ AddPeer()

void Photon.LoadBalancing.MasterServer.Lobby.GameState.AddPeer ( ILobbyPeer  peer)
inline

◆ AddSlots()

void Photon.LoadBalancing.MasterServer.Lobby.GameState.AddSlots ( JoinGameRequest  request)
inline

◆ CheckJoinTimeOuts()

void Photon.LoadBalancing.MasterServer.Lobby.GameState.CheckJoinTimeOuts ( DateTime  minDateTime)
inline

◆ CheckSlots() [1/2]

bool Photon.LoadBalancing.MasterServer.Lobby.GameState.CheckSlots ( string  userId,
string[]  expectedUsers 
)
inline

◆ CheckSlots() [2/2]

bool Photon.LoadBalancing.MasterServer.Lobby.GameState.CheckSlots ( string  userId,
string[]  expectedUsers,
out string  errMsg 
)
inline

◆ ContainsUser()

bool Photon.LoadBalancing.MasterServer.Lobby.GameState.ContainsUser ( string  userId)
inline

◆ GetRedisData()

Hashtable Photon.LoadBalancing.MasterServer.Lobby.GameState.GetRedisData ( )
inline

◆ GetServerAddress()

string Photon.LoadBalancing.MasterServer.Lobby.GameState.GetServerAddress ( ILobbyPeer  peer)
inline

◆ IsUserExpected()

bool Photon.LoadBalancing.MasterServer.Lobby.GameState.IsUserExpected ( string  userId)
inline

◆ IsUserInExcludeList()

bool Photon.LoadBalancing.MasterServer.Lobby.GameState.IsUserInExcludeList ( string  userId)
inline

◆ MatchGameProperties()

bool Photon.LoadBalancing.MasterServer.Lobby.GameState.MatchGameProperties ( Hashtable  matchProperties)
inline

◆ OnRemoved()

void Photon.LoadBalancing.MasterServer.Lobby.GameState.OnRemoved ( )
inline

◆ ResetGameServer()

void Photon.LoadBalancing.MasterServer.Lobby.GameState.ResetGameServer ( )
inline

◆ ToHashTable()

Hashtable Photon.LoadBalancing.MasterServer.Lobby.GameState.ToHashTable ( )
inline

◆ ToString()

override string Photon.LoadBalancing.MasterServer.Lobby.GameState.ToString ( )
inline

◆ TrySetProperties()

bool Photon.LoadBalancing.MasterServer.Lobby.GameState.TrySetProperties ( Hashtable  gameProperties,
out bool  changed,
out string  debugMessage 
)
inline

◆ Update()

bool Photon.LoadBalancing.MasterServer.Lobby.GameState.Update ( UpdateGameEvent  updateOperation)
inline

Member Data Documentation

◆ CreateDateId

const byte Photon.LoadBalancing.MasterServer.Lobby.GameState.CreateDateId = 2
static

◆ ExcludedUsersId

const byte Photon.LoadBalancing.MasterServer.Lobby.GameState.ExcludedUsersId = 11
static

◆ ExpectedUsersId

const byte Photon.LoadBalancing.MasterServer.Lobby.GameState.ExpectedUsersId = 12
static

◆ GameId

const byte Photon.LoadBalancing.MasterServer.Lobby.GameState.GameId = 0
static

◆ InactiveCountId

const byte Photon.LoadBalancing.MasterServer.Lobby.GameState.InactiveCountId = 1
static

◆ InactiveUsersId

const byte Photon.LoadBalancing.MasterServer.Lobby.GameState.InactiveUsersId = 10
static

◆ IsOpenId

const byte Photon.LoadBalancing.MasterServer.Lobby.GameState.IsOpenId = 6
static

◆ IsVisibleId

const byte Photon.LoadBalancing.MasterServer.Lobby.GameState.IsVisibleId = 5
static

◆ Lobby

readonly AppLobby Photon.LoadBalancing.MasterServer.Lobby.GameState.Lobby

◆ LobbyNameId

const byte Photon.LoadBalancing.MasterServer.Lobby.GameState.LobbyNameId = 8
static

◆ LobbyTypeId

const byte Photon.LoadBalancing.MasterServer.Lobby.GameState.LobbyTypeId = 9
static

◆ MaxPlayerId

const byte Photon.LoadBalancing.MasterServer.Lobby.GameState.MaxPlayerId = 7
static

◆ PropertiesId

const byte Photon.LoadBalancing.MasterServer.Lobby.GameState.PropertiesId = 4
static

◆ UserListId

const byte Photon.LoadBalancing.MasterServer.Lobby.GameState.UserListId = 3
static

Property Documentation

◆ CheckUserIdOnJoin

bool Photon.LoadBalancing.MasterServer.Lobby.GameState.CheckUserIdOnJoin
get

◆ CreateDateUtc

DateTime Photon.LoadBalancing.MasterServer.Lobby.GameState.CreateDateUtc
get

◆ ExcludedActors

List<ExcludedActorInfo> Photon.LoadBalancing.MasterServer.Lobby.GameState.ExcludedActors
get

◆ GameServer

IncomingGameServerPeer Photon.LoadBalancing.MasterServer.Lobby.GameState.GameServer
get

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

◆ GameServerPlayerCount

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

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

◆ HasBeenCreatedOnGameServer

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.

◆ Id

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

Gets the game id.

◆ InactivePlayerCount

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

◆ IsJoinable

bool Photon.LoadBalancing.MasterServer.Lobby.GameState.IsJoinable
get

◆ IsOpen

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.

◆ IsPersistent

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

◆ IsVisbleInLobby

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.

◆ IsVisible

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.

◆ JoiningPlayerCount

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

Gets the number of players currently joining the game.

◆ MaxPlayer

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

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

◆ PlayerCount

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

Gets the number of players joined the game.

◆ Properties

Dictionary<object, object> Photon.LoadBalancing.MasterServer.Lobby.GameState.Properties
get

◆ ShouldBePreservedInList

bool Photon.LoadBalancing.MasterServer.Lobby.GameState.ShouldBePreservedInList
get

◆ YetExpectedUsersCount

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