Barotrauma Client Doc
Barotrauma.NetworkSerialize Class Reference

Marks fields and properties as to be serialized and deserialized by INetSerializableStruct. Also contains settings for some types like maximum and minimum values for numbers to reduce bits used. More...

Inheritance diagram for Barotrauma.NetworkSerialize:

Public Member Functions

 NetworkSerialize ([CallerLineNumber] int lineNumber=0)
 

Public Attributes

int MaxValueInt = int.MaxValue
 
int MinValueInt = int.MinValue
 
float MaxValueFloat = float.MaxValue
 
float MinValueFloat = float.MinValue
 
int NumberOfBits = 8
 
bool IncludeColorAlpha = false
 
int ArrayMaxSize = ushort.MaxValue
 
readonly int OrderKey
 

Detailed Description

Marks fields and properties as to be serialized and deserialized by INetSerializableStruct. Also contains settings for some types like maximum and minimum values for numbers to reduce bits used.

struct NetPurchasedItem : INetSerializableStruct
{
public string Identifier;
public string[] Tags;
public int Amount;
}
NetworkSerialize([CallerLineNumber] int lineNumber=0)

Using the attribute on the struct will make all fields and properties serialized

Definition at line 38 of file INetSerializableStruct.cs.

Constructor & Destructor Documentation

◆ NetworkSerialize()

Barotrauma.NetworkSerialize.NetworkSerialize ( [CallerLineNumber] int  lineNumber = 0)

Definition at line 50 of file INetSerializableStruct.cs.

Member Data Documentation

◆ ArrayMaxSize

int Barotrauma.NetworkSerialize.ArrayMaxSize = ushort.MaxValue

Definition at line 46 of file INetSerializableStruct.cs.

◆ IncludeColorAlpha

bool Barotrauma.NetworkSerialize.IncludeColorAlpha = false

Definition at line 45 of file INetSerializableStruct.cs.

◆ MaxValueFloat

float Barotrauma.NetworkSerialize.MaxValueFloat = float.MaxValue

Definition at line 42 of file INetSerializableStruct.cs.

◆ MaxValueInt

int Barotrauma.NetworkSerialize.MaxValueInt = int.MaxValue

Definition at line 40 of file INetSerializableStruct.cs.

◆ MinValueFloat

float Barotrauma.NetworkSerialize.MinValueFloat = float.MinValue

Definition at line 43 of file INetSerializableStruct.cs.

◆ MinValueInt

int Barotrauma.NetworkSerialize.MinValueInt = int.MinValue

Definition at line 41 of file INetSerializableStruct.cs.

◆ NumberOfBits

int Barotrauma.NetworkSerialize.NumberOfBits = 8

Definition at line 44 of file INetSerializableStruct.cs.

◆ OrderKey

readonly int Barotrauma.NetworkSerialize.OrderKey

Definition at line 48 of file INetSerializableStruct.cs.