PlayerConnectionWatcher
This is meant to be used in combination with other scripts. It will simply fire UnityEvents based on events that happen in any of the ClientConnection's.
The first string value in all of these events will be the ClientConnection's player name.
Public Fields
| Field Name | Description |
|---|---|
| UnityEvent<string, bool> OnAnyDeadChanged | This is fired any time ANY of the ClientConnection's have their isDead field change values. |
| UnityEvent<string, int> OnAnyHealthChanged | This is fired any time ANY of the ClientConnection's have their health value change |
| UnityEvent<string, string> OnAnySceneChanged | This is fired any time ANY of the ClientConnection's have their scene field change |
| UnityEvent<string, string> OnAnyPlayerNameChanged | This is fired any time ANY of the ClientConnection's have their playerName field change |
| UnityEvent<string> OnAnyPlayerConnected | This is fired any time ANY new ClientConnection is generated. |
| UnityEvent<string> OnAnyPlayerDisconnected | This is fired any time ANY new ClientConnection is destroyed. |
Public Virtual Methods
| Method | Description |
|---|---|
| void TriggerPlayerNameChanged(ClientConnection conn, string newName) | Will fire the OnAnyPlayerNameChanged UnityEvent |
| void TriggerOnDeadChanged(ClientConnection conn, bool value) | Will fire the OnAnyDeadChanged UnityEvent |
| void TriggerOnDeadChanged(ClientConnection conn, bool value) | Will fire the OnAnyDeadChanged UnityEvent |
| void TriggerSceneChanged(ClientConnection conn, string sceneName) | Will fire the OnAnySceneChanged UnityEvent |
| void TriggerHealthChanged(ClientConnection conn, int value) | Will fire the OnAnyHealthChanged UnityEvent |
| void TriggerPlayerDisconnected(ClientConnection conn) | Will fire the OnAnyPlayerDisconnected UnityEvent |
| void TriggerPlayerConnected(ClientConnection conn) | Will fire the OnAnyPlayerConnected UnityEvent |