public void Serialize(ref int value)
{
this.Serializei(ref value);
}
BitStream::Serialize ( |
|
BitStream::Serialize ( |
|
BitStream::Serialize ( |
|
BitStream::Serialize ( |
|
BitStream::Serialize ( |
|
BitStream::Serialize ( |
|
BitStream::Serialize ( bool &value ) : void | |
BitStream::Serialize ( char &value ) : void | |
BitStream::Serialize ( float &value ) : void | |
BitStream::Serialize ( float &value, [ maxDelta ) : void | |
BitStream::Serialize ( short &value ) : void | |
BitStream::Serialize ( string &value ) : void |
public int playerIndex = 0; // Player index of driver who spawned fake item box #endregion Fields #region Methods // Send data over network void OnSerializeNetworkView(BitStream stream, NetworkMessageInfo info) { Vector3 position = Vector3.zero; Vector3 forwardVector = Vector3.zero; Vector3 upVector = Vector3.zero; if (stream.isWriting) { // Sending data... position = this.transform.position; forwardVector = this.transform.forward; upVector = this.transform.up; stream.Serialize(ref position); stream.Serialize(ref forwardVector); stream.Serialize(ref upVector); stream.Serialize(ref moveDirection); stream.Serialize(ref this.playerIndex); } else { // Receiving data... stream.Serialize(ref position); stream.Serialize(ref forwardVector); stream.Serialize(ref upVector); this.transform.position = position; this.transform.rotation = Quaternion.LookRotation(forwardVector, upVector); stream.Serialize(ref moveDirection); stream.Serialize(ref this.playerIndex); } }