|
Network Library Documentation
|
Synchronizes animator parameters (bools, floats, triggers) over the network. Sends changes from the local user to the server and applies received parameters on remote clients. More...
Public Member Functions | |
| void | Trigger (string triggerName) |
| Triggers an animation parameter both locally and across the network if controlled by local user. | |
| void | ApplyRemoteParameter (int type, string name, float value) |
| Applies an animation parameter update received from a remote user. | |
Public Attributes | |
| NetworkUser | UserInfo |
| Information about the network user used to check local or remote status. | |
Private Member Functions | |
| void | Start () |
| Initializes the animator reference and caches all initial animator parameter states. | |
| void | Update () |
| Checks for any changed animator parameters if the object is controlled by the local user. Sends updated parameters to the server. | |
| void | CacheInitialStates () |
| Stores initial states of all bool and float animator parameters for change tracking. | |
| void | CheckAndSendBoolChanges () |
| Detects and sends changed boolean parameters to the server. | |
| void | CheckAndSendFloatChanges () |
| Detects and sends changed float parameters to the server. | |
Private Attributes | |
| Animator | animator |
| Reference to the Animator component used to control animations. | |
| Dictionary< string, bool > | boolStates = new Dictionary<string, bool>() |
| Tracks last known values of boolean parameters to detect changes. | |
| Dictionary< string, float > | floatStates = new Dictionary<string, float>() |
| Tracks last known values of float parameters to detect changes. | |
Synchronizes animator parameters (bools, floats, triggers) over the network. Sends changes from the local user to the server and applies received parameters on remote clients.
Definition at line 8 of file NetworkAnimator.cs.
| void NetworkAnimator.ApplyRemoteParameter | ( | int | type, |
| string | name, | ||
| float | value ) |
Applies an animation parameter update received from a remote user.
Definition at line 122 of file NetworkAnimator.cs.
|
private |
Stores initial states of all bool and float animator parameters for change tracking.
Definition at line 50 of file NetworkAnimator.cs.
|
private |
Detects and sends changed boolean parameters to the server.
Definition at line 67 of file NetworkAnimator.cs.
|
private |
Detects and sends changed float parameters to the server.
Definition at line 88 of file NetworkAnimator.cs.
|
private |
Initializes the animator reference and caches all initial animator parameter states.
Definition at line 29 of file NetworkAnimator.cs.
| void NetworkAnimator.Trigger | ( | string | triggerName | ) |
Triggers an animation parameter both locally and across the network if controlled by local user.
Definition at line 111 of file NetworkAnimator.cs.
|
private |
Checks for any changed animator parameters if the object is controlled by the local user. Sends updated parameters to the server.
Definition at line 40 of file NetworkAnimator.cs.
|
private |
Reference to the Animator component used to control animations.
Definition at line 17 of file NetworkAnimator.cs.
|
private |
Tracks last known values of boolean parameters to detect changes.
Definition at line 21 of file NetworkAnimator.cs.
|
private |
Tracks last known values of float parameters to detect changes.
Definition at line 25 of file NetworkAnimator.cs.
| NetworkUser NetworkAnimator.UserInfo |
Information about the network user used to check local or remote status.
Definition at line 13 of file NetworkAnimator.cs.