Quantum 3 3.0.13

Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Photon.Deterministic.Protocol.FrameSnapshot Class Reference

The client sends a snapshot of the game state to the server. The message is send multiple times if the snapshot is too large. More...

Inheritance diagram for Photon.Deterministic.Protocol.FrameSnapshot:
Photon.Deterministic.Protocol.Message

Public Member Functions

override void Serialize (Serializer serializer, BitStream stream)
 The message serialization (writing and reading). More...
 
override string ToString ()
 Debug string with message content. More...
 

Static Public Member Functions

static void Decode (FrameSnapshot[] snapshots, ref Byte[] data, ref Int32 tick)
 Decode multiple messages into a snapshot. More...
 
static FrameSnapshot[] Encode (Int32 tick, Byte[] data)
 Encode a snapshot into multiple FrameSnapshot messages. More...
 

Public Attributes

Byte[] Data
 The snapshot data chunk. More...
 
Boolean Last
 If this message is the last chunk of the snapshot. More...
 
Int32 Tick
 The tick of the snapshot. More...
 
Int32 TotalSize
 The total size of the snapshot. More...
 

Static Public Attributes

const int MaxChunkSize = 48 * 1024
 Maximum chunk size. More...
 

Detailed Description

The client sends a snapshot of the game state to the server. The message is send multiple times if the snapshot is too large.

Member Function Documentation

◆ Serialize()

override void Photon.Deterministic.Protocol.FrameSnapshot.Serialize ( Serializer  serializer,
BitStream  stream 
)
inlinevirtual

The message serialization (writing and reading).

Parameters
serializerQuantum protocol serializer
streamThe bitstream to write to or read from

Implements Photon.Deterministic.Protocol.Message.

◆ ToString()

override string Photon.Deterministic.Protocol.FrameSnapshot.ToString ( )
inline

Debug string with message content.

Returns
Debug string

◆ Encode()

static FrameSnapshot [] Photon.Deterministic.Protocol.FrameSnapshot.Encode ( Int32  tick,
Byte[]  data 
)
inlinestatic

Encode a snapshot into multiple FrameSnapshot messages.

Parameters
tickThe tick of the snapshot.
dataThe snapshot data
Returns
The messages to send.

◆ Decode()

static void Photon.Deterministic.Protocol.FrameSnapshot.Decode ( FrameSnapshot[]  snapshots,
ref Byte[]  data,
ref Int32  tick 
)
inlinestatic

Decode multiple messages into a snapshot.

Parameters
snapshotsThe snapshot messages
dataThe resulting snapshot data
tickThe tick of the snapshot

Member Data Documentation

◆ MaxChunkSize

const int Photon.Deterministic.Protocol.FrameSnapshot.MaxChunkSize = 48 * 1024
static

Maximum chunk size.

◆ Tick

Int32 Photon.Deterministic.Protocol.FrameSnapshot.Tick

The tick of the snapshot.

◆ TotalSize

Int32 Photon.Deterministic.Protocol.FrameSnapshot.TotalSize

The total size of the snapshot.

◆ Last

Boolean Photon.Deterministic.Protocol.FrameSnapshot.Last

If this message is the last chunk of the snapshot.

◆ Data

Byte [] Photon.Deterministic.Protocol.FrameSnapshot.Data

The snapshot data chunk.