Struct Entity
A local index for coherence entities.
public struct Entity
Constructors
Entity(ushort, byte, bool)
public Entity(ushort index, byte version, bool isAbsolute)
Parameters
Fields
Absolute
public static readonly bool Absolute
Field Value
ClientInitialIndex
ClientInitialIndex .
public const ushort ClientInitialIndex = 32768
Field Value
DefaultComparer
public static readonly EntityComparer DefaultComparer
Field Value
EndOfEntities
EndOfEntities used to mark the serialized end of entities.
public const ushort EndOfEntities = 65535
Field Value
InvalidAbsolute
public static readonly Entity InvalidAbsolute
Field Value
InvalidRelative
public static readonly Entity InvalidRelative
Field Value
MaxID
MaxID is the highest useable ID.
public const ushort MaxID = 65534
Field Value
MaxIndex
MaxIndex max ID index.
public const ushort MaxIndex = 65535
Field Value
MaxIndices
MaxIndices is the maximum number of usable indicies.
public const ushort MaxIndices = 65533
Field Value
MaxVersions
MaxVersions max number of times Index is reused.
public const byte MaxVersions = 16
Field Value
NumIndexBits
NumIndexBits is the number of bits reqiured to serialize Index.
public const int NumIndexBits = 16
Field Value
NumVersionBits
NumVersionBits is the number of bits required to serialize up to MaxVersion values. Should be Log2(MaxVersions).
public const int NumVersionBits = 4
Field Value
Relative
public static readonly bool Relative
Field Value
Properties
Index
public readonly ushort Index { get; }
Property Value
IsAbsolute
public readonly bool IsAbsolute { get; }
Property Value
IsValid
public bool IsValid { get; }
Property Value
NextVersion
public byte NextVersion { get; }
Property Value
Version
public readonly byte Version { get; }
Property Value
Methods
AssertAbsolute()
public void AssertAbsolute()
AssertRelative()
public void AssertRelative()
AssertSameType(Entity, Entity)
public static void AssertSameType(Entity a, Entity b)
Parameters
CompareTo(Entity)
public int CompareTo(Entity other)
Parameters
other
Entity
Returns
Equals(Entity)
public bool Equals(Entity other)
Parameters
other
Entity
Returns
Equals(object)
public override bool Equals(object obj)
Parameters
obj
object
Returns
GetHashCode()
public override int GetHashCode()
Returns
IsClientCreated()
public bool IsClientCreated()
Returns
ToString()
public override string ToString()
Returns
TypeToString(bool)
public static string TypeToString(bool isAbsolute)
Parameters
isAbsolute
bool
Returns
Operators
operator ==(Entity, Entity)
public static bool operator ==(Entity a, Entity b)
Parameters
Returns
operator !=(Entity, Entity)
public static bool operator !=(Entity a, Entity b)