This class keeps track of individual Photon connections and Quantum simulations (QuantumRunner). More...
Public Member Functions | |
QuantumMultiClientPlayer () | |
Constructor. More... | |
void | BindView (QuantumMultiClientPlayerView view, bool isFirstPlayer, bool isAddPlayerEnabled) |
Binds a player view to this player. More... | |
void | CreateEntityViewUpdater (QuantumEntityViewUpdater entityViewUpdaterTemplate, QuantumGame game) |
Instantiates an entity view updater script from a template. More... | |
int | CreateFreeClientPlayerSlot (int maxLocalPlayers) |
Tries to allocate a free player slot for this player. Returns a valid player slot or -1 if no slot is available. More... | |
void | CreateInput (GameObject playerInputTemplate) |
Instantiates an input script from a template. More... | |
void | Destroy () |
Unity destroy callback shuts down the player (ui, input and evu). More... | |
int | GetHighestSiblingIndex () |
Gets the highest sibling index of this player and all local players used to correctly name GameObjects. More... | |
Public Attributes | |
GameObject | Input => _input |
The Input object to toggle on or off. More... | |
string | RunnerId => Runner?.Id |
Access the runner id of it's runner or null if it does not exist. More... | |
QuantumMultiClientPlayerView | View => _ui |
Access the view object. More... | |
Properties | |
Action< QuantumMultiClientPlayer > | DestroyPlayerCallback [get, set] |
The callback to notify the MultiClientRunner class of pressing exit. More... | |
List< QuantumMultiClientPlayer > | LocalPlayers [get, set] |
Other local players running on this players connection and QuantumRunner. More... | |
QuantumMultiClientPlayer | MainPlayer [get, set] |
If this player is using the connection and QuantumRunner of another player (only used when AddAsLocalPlayers is enabled). More... | |
int | PlayerSlot [get, set] |
The local player slot this player uses. Only used when AddAsLocalPlayers is enabled. More... | |
QuantumRunner | Runner [get, set] |
The QuantumRunner that this player belongs to. More... | |
IDisposable | ShutdownHandler [get, set] |
The shutdown handler used to keep track of disconnect events from the QuantumRunner. Requires a reference to clean up during destruction. More... | |
This class keeps track of individual Photon connections and Quantum simulations (QuantumRunner).
|
inline |
Constructor.
|
inline |
Tries to allocate a free player slot for this player. Returns a valid player slot or -1 if no slot is available.
|
inline |
Gets the highest sibling index of this player and all local players used to correctly name GameObjects.
|
inline |
Instantiates an input script from a template.
|
inline |
Instantiates an entity view updater script from a template.
|
inline |
Binds a player view to this player.
|
inline |
Unity destroy callback shuts down the player (ui, input and evu).
string Quantum.QuantumMultiClientPlayer.RunnerId => Runner?.Id |
Access the runner id of it's runner or null if it does not exist.
GameObject Quantum.QuantumMultiClientPlayer.Input => _input |
The Input object to toggle on or off.
QuantumMultiClientPlayerView Quantum.QuantumMultiClientPlayer.View => _ui |
Access the view object.
|
getset |
The QuantumRunner that this player belongs to.
|
getset |
The shutdown handler used to keep track of disconnect events from the QuantumRunner. Requires a reference to clean up during destruction.
|
getset |
The callback to notify the MultiClientRunner class of pressing exit.
|
getset |
The local player slot this player uses. Only used when AddAsLocalPlayers is enabled.
|
getset |
If this player is using the connection and QuantumRunner of another player (only used when AddAsLocalPlayers is enabled).
|
getset |
Other local players running on this players connection and QuantumRunner.