Manages all Network related topics, is persistent across scenes, just as the game manager.
More...
|
|
void | Awake () |
| |
|
void | Start () |
| |
|
bool | IsMaster () |
| | Returns whether this client is currently a master. True while Hosting or in OfflineMode.
|
| |
| void | Connect () |
| | Main connection function from outside the NET layer. More...
|
| |
|
void | Join () |
| |
|
void | Destroy (GameObject obj, float delay) |
| |
|
NetStateMachine | GetStateMachine () |
| |
|
override void | OnConnectedToMaster () |
| | This is called once we completely joined the master server and can create rooms.
|
| |
|
override void | OnJoinedRoom () |
| | Called after joining your own or other player's room.
|
| |
|
override void | OnCreateRoomFailed (short returnCode, string message) |
| |
|
override void | OnCreatedRoom () |
| |
|
override void | OnJoinRoomFailed (short returnCode, string message) |
| |
|
override void | OnJoinRandomFailed (short returnCode, string message) |
| |
|
override void | OnLeftRoom () |
| |
| override void | OnDisconnected (Photon.Realtime.DisconnectCause cause) |
| | A Disconnect can be intentional or unintentional. More...
|
| |
|
override void | OnPlayerEnteredRoom (Client newClient) |
| | This callback is only called for other clients joining, not for this client.
|
| |
| override void | OnPlayerLeftRoom (Client client) |
| |
| override void | OnPlayerPropertiesUpdate (Client target, ExitGames.Client.Photon.Hashtable changedProps) |
| | Is called whenever the custom data for any client changes. More...
|
| |
|
override void | OnRoomPropertiesUpdate (ExitGames.Client.Photon.Hashtable changedProps) |
| |
Manages all Network related topics, is persistent across scenes, just as the game manager.
- Todo:
- : Use Photon "Custom Properties" to sync client info, such as player info and infrequent stuff
Definition at line 30 of file NetManager.cs.
◆ Connect()
Main connection function from outside the NET layer.
Moves the Net State Machine to the "Connecting" state if plausible to do so. The detour over 'instance' allows a call of this funcion from an event.
Definition at line 127 of file NetManager.cs.
◆ OnDisconnected()
| override void OnDisconnected |
( |
Photon.Realtime.DisconnectCause |
cause | ) |
|
|
inline |
A Disconnect can be intentional or unintentional.
Intentional: Triggered by any of the menus. Unintentional: Can happen at any time!
Definition at line 208 of file NetManager.cs.
◆ OnPlayerLeftRoom()
| override void OnPlayerLeftRoom |
( |
Client |
client | ) |
|
|
inline |
◆ OnPlayerPropertiesUpdate()
| override void OnPlayerPropertiesUpdate |
( |
Client |
target, |
|
|
ExitGames.Client.Photon.Hashtable |
changedProps |
|
) |
| |
|
inline |
Is called whenever the custom data for any client changes.
Is also called for the local client if connected or in active Offline Mode. In order to decouple the net management from the specifics of the game, no assumptions are made at this point on the content. Also an event with the data is raised so users of the NET layer subscribe to it, rather than being pushed.
Definition at line 246 of file NetManager.cs.
◆ playerDeathNetEvent
Sent upon player death in-game.
- Todo:
- : Communicate via custom property 'state' (alive, dead, not playing)
Definition at line 57 of file NetManager.cs.
The documentation for this class was generated from the following file:
- C:/Users/Toni/Documents/Programming/Unity/BomberUnits/Assets/Scripts/Net/NetManager.cs