The client representation in the Quantum server plugin. More...
Public Member Functions | |
bool | HasPlayer (PlayerRef player) |
Check if the client has the player index assigned. More... | |
Public Attributes | |
Boolean | Active => Joined && WaitingForSnapshot == false && DisconnectTime.HasValue == false |
Client has joined, is not waiting for snapshots (anymore) and has not been disconnected. More... | |
Int32 | ActorNr |
The Photon Realtime client index (Actor) is assigned by the server after the client has joined a room. The room is always ActorNr 0 and client the client numbering start with 1. The server always increments the number over the lifetime of the room. Clients that successfully RejoinAndReconnect() will receive the same ActorNr. More... | |
String | DisconnectMessage |
The disconnect reason set from the server when disconnecting this client Photon.Deterministic.Server.ErrorStrings. More... | |
Double? | DisconnectTime |
Will be set to DeterministicPluginSession.GetTimerSeconds() + 1 when disconnecting the player. This is also marks the client as disconnected in a few places. More... | |
Boolean | Joined => ClientId != null |
Has the player sent the join message and has it been processed and a ClientId was set. More... | |
List< PlayerRef > | Players => _playerMap.Players |
The global players this client controls. More... | |
int | PlayerSlotsCount => _playerMap.Count |
Number of player slots this client owns. More... | |
Queue< Protocol.Message > | ProtocolSendQueue |
Enqueue protocol messages which are sent to the client. More... | |
Int32 | Rtt |
Last received round trip time for this client by Photon.Deterministic.Protocol.RttUpdate. More... | |
byte[] | RuntimePlayer |
If this is set, it will overwrite the runtime player send by the client. More... | |
bool | SnapshotsBlocked |
This client is not selected to send snapshots to other player while there are other choices. Has to be set during OnDeterministicStartRequest(). Will be overwritten during Join webhook response. More... | |
Boolean | Spectator => Joined && _playerMap.Count == 0 |
Is the client a spectator. Spectators have no player slots and can not send any input or commands. More... | |
Object | UserToken |
Attach any data you want to the client. For example something you want to cache while waiting for a HTTP response. More... | |
Boolean | WaitingForSnapshot |
This client is connected but is waiting for a snapshot to be send by either other clients or the server. More... | |
Int32 | WaitingForSnapshotTimeoutTick |
The tick when waiting for snapshots will time out and the client will be disconnected. More... | |
Properties | |
String | ClientId [get] |
Client id is a secret between the client and the server. The client creates this id and other clients do not know this id. It is used to match reconnecting player so they receive the same player index. More... | |
int | MaxPlayerSlots [get, set] |
The maximum number of player slots this client can request. -1 = unlimited. Is initialized by webhook CreateGame and Join responses. More... | |
String | UserId [get, set] |
The Photon user Id for this client. More... | |
The client representation in the Quantum server plugin.
|
inline |
Check if the client has the player index assigned.
player | Player index |
true
if the client has the player index assigned.Int32 Photon.Deterministic.Server.DeterministicPluginClient.Rtt |
Last received round trip time for this client by Photon.Deterministic.Protocol.RttUpdate.
Int32 Photon.Deterministic.Server.DeterministicPluginClient.ActorNr |
The Photon Realtime client index (Actor) is assigned by the server after the client has joined a room. The room is always ActorNr 0 and client the client numbering start with 1. The server always increments the number over the lifetime of the room. Clients that successfully RejoinAndReconnect() will receive the same ActorNr.
Boolean Photon.Deterministic.Server.DeterministicPluginClient.WaitingForSnapshot |
This client is connected but is waiting for a snapshot to be send by either other clients or the server.
Int32 Photon.Deterministic.Server.DeterministicPluginClient.WaitingForSnapshotTimeoutTick |
The tick when waiting for snapshots will time out and the client will be disconnected.
Object Photon.Deterministic.Server.DeterministicPluginClient.UserToken |
Attach any data you want to the client. For example something you want to cache while waiting for a HTTP response.
Double? Photon.Deterministic.Server.DeterministicPluginClient.DisconnectTime |
Will be set to DeterministicPluginSession.GetTimerSeconds() + 1 when disconnecting the player. This is also marks the client as disconnected in a few places.
String Photon.Deterministic.Server.DeterministicPluginClient.DisconnectMessage |
The disconnect reason set from the server when disconnecting this client Photon.Deterministic.Server.ErrorStrings.
List<PlayerRef> Photon.Deterministic.Server.DeterministicPluginClient.Players => _playerMap.Players |
The global players this client controls.
int Photon.Deterministic.Server.DeterministicPluginClient.PlayerSlotsCount => _playerMap.Count |
Number of player slots this client owns.
bool Photon.Deterministic.Server.DeterministicPluginClient.SnapshotsBlocked |
This client is not selected to send snapshots to other player while there are other choices. Has to be set during OnDeterministicStartRequest(). Will be overwritten during Join webhook response.
Queue<Protocol.Message> Photon.Deterministic.Server.DeterministicPluginClient.ProtocolSendQueue |
Enqueue protocol messages which are sent to the client.
byte [] Photon.Deterministic.Server.DeterministicPluginClient.RuntimePlayer |
If this is set, it will overwrite the runtime player send by the client.
Boolean Photon.Deterministic.Server.DeterministicPluginClient.Joined => ClientId != null |
Has the player sent the join message and has it been processed and a ClientId was set.
Boolean Photon.Deterministic.Server.DeterministicPluginClient.Active => Joined && WaitingForSnapshot == false && DisconnectTime.HasValue == false |
Client has joined, is not waiting for snapshots (anymore) and has not been disconnected.
Boolean Photon.Deterministic.Server.DeterministicPluginClient.Spectator => Joined && _playerMap.Count == 0 |
Is the client a spectator. Spectators have no player slots and can not send any input or commands.
|
get |
Client id is a secret between the client and the server. The client creates this id and other clients do not know this id. It is used to match reconnecting player so they receive the same player index.
|
getset |
The Photon user Id for this client.
|
getset |
The maximum number of player slots this client can request. -1 = unlimited. Is initialized by webhook CreateGame and Join responses.