Table of Contents

Struct Entity

Namespace
Coherence.Entities
Assembly
Coherence.Entities.dll

A local index for coherence entities.

public struct Entity

Constructors

Entity(ushort, byte, bool)

public Entity(ushort index, byte version, bool isAbsolute)

Parameters

index ushort
version byte
isAbsolute bool

Fields

Absolute

public static readonly bool Absolute

Field Value

bool

ClientInitialIndex

ClientInitialIndex .

public const ushort ClientInitialIndex = 32768

Field Value

ushort

DefaultComparer

public static readonly EntityComparer DefaultComparer

Field Value

EntityComparer

EndOfEntities

EndOfEntities used to mark the serialized end of entities.

public const ushort EndOfEntities = 65535

Field Value

ushort

InvalidAbsolute

public static readonly Entity InvalidAbsolute

Field Value

Entity

InvalidRelative

public static readonly Entity InvalidRelative

Field Value

Entity

MaxID

MaxID is the highest useable ID.

public const ushort MaxID = 65534

Field Value

ushort

MaxIndex

MaxIndex max ID index.

public const ushort MaxIndex = 65535

Field Value

ushort

MaxIndices

MaxIndices is the maximum number of usable indicies.

public const ushort MaxIndices = 65533

Field Value

ushort

MaxVersions

MaxVersions max number of times Index is reused.

public const byte MaxVersions = 16

Field Value

byte

NumIndexBits

NumIndexBits is the number of bits reqiured to serialize Index.

public const int NumIndexBits = 16

Field Value

int

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

int

Relative

public static readonly bool Relative

Field Value

bool

Properties

Index

public readonly ushort Index { get; }

Property Value

ushort

IsAbsolute

public readonly bool IsAbsolute { get; }

Property Value

bool

IsValid

public bool IsValid { get; }

Property Value

bool

NextVersion

public byte NextVersion { get; }

Property Value

byte

Version

public readonly byte Version { get; }

Property Value

byte

Methods

AssertAbsolute()

public void AssertAbsolute()

AssertRelative()

public void AssertRelative()

AssertSameType(Entity, Entity)

public static void AssertSameType(Entity a, Entity b)

Parameters

a Entity
b Entity

CompareTo(Entity)

public int CompareTo(Entity other)

Parameters

other Entity

Returns

int

Equals(Entity)

public bool Equals(Entity other)

Parameters

other Entity

Returns

bool

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

IsClientCreated()

public bool IsClientCreated()

Returns

bool

ToString()

public override string ToString()

Returns

string

TypeToString(bool)

public static string TypeToString(bool isAbsolute)

Parameters

isAbsolute bool

Returns

string

Operators

operator ==(Entity, Entity)

public static bool operator ==(Entity a, Entity b)

Parameters

a Entity
b Entity

Returns

bool

operator !=(Entity, Entity)

public static bool operator !=(Entity a, Entity b)

Parameters

a Entity
b Entity

Returns

bool