My Project
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
NetworkState Class Reference

Wraps the State in the NetworkMessage so we can send it over the network. More...

Public Member Functions

 NetworkState ()
 Default contstructor, does nothing.
 
 NetworkState (SmoothSync smoothSyncScript)
 
void copyFromSmoothSync (SmoothSync smoothSyncScript)
 Copy the SmoothSync object to a NetworkState.
 
void Serialize (BitPacker writer)
 Serialize the message over the network.
 
void Deserialize (BitPacker reader, SmoothSync smoothSync)
 Deserialize a message from the network.
 

Public Attributes

SmoothSync smoothSync
 The SmoothSync object associated with this State.
 
SmoothState state = new SmoothState()
 The State that will be sent over the network.
 

Detailed Description

Wraps the State in the NetworkMessage so we can send it over the network.

This only sends and receives the parts of the State that are enabled on the SmoothSync component.

Member Function Documentation

◆ copyFromSmoothSync()

void NetworkState.copyFromSmoothSync ( SmoothSync  smoothSyncScript)
inline

Copy the SmoothSync object to a NetworkState.

Parameters
smoothSyncScriptThe SmoothSync object

◆ Deserialize()

void NetworkState.Deserialize ( BitPacker  reader,
SmoothSync  smoothSync 
)
inline

Deserialize a message from the network.

Only receives what it needs and decompresses floats if you chose to.

Parameters
writerThe Networkreader to read from.

◆ Serialize()

void NetworkState.Serialize ( BitPacker  writer)
inline

Serialize the message over the network.

Only sends what it needs and compresses floats if you chose to.

Parameters
writerThe NetworkWriter to write to.

The documentation for this class was generated from the following file: