Show / Hide Table of Contents

Class InternalEntity

Inheritance
object
InternalBaseClass
InternalEntity
ControllerLogic
EntityLogic
SingletonEntityLogic
Implements
IComparable<InternalEntity>
Inherited Members
InternalBaseClass.OnSyncRequested()
Namespace: LiteEntitySystem.Internal
Assembly: LiteEntitySystem.dll
Syntax
public abstract class InternalEntity : InternalBaseClass, IComparable<InternalEntity>

Constructors

InternalEntity(EntityParams)

Declaration
protected InternalEntity(EntityParams entityParams)
Parameters
Type Name Description
EntityParams entityParams

Fields

ClassId

Entity class id

Declaration
public readonly ushort ClassId
Field Value
Type Description
ushort

EntityManager

Entity manager

Declaration
public readonly EntityManager EntityManager
Field Value
Type Description
EntityManager

Id

Entity instance id

Declaration
public readonly ushort Id
Field Value
Type Description
ushort

Version

Entity version (for id reuse)

Declaration
public readonly byte Version
Field Value
Type Description
byte

Properties

ClientManager

ClientEntityManager that available only on client. Will throw exception if called on server

Declaration
public ClientEntityManager ClientManager { get; }
Property Value
Type Description
ClientEntityManager

IsClient

Is entity on server

Declaration
public bool IsClient { get; }
Property Value
Type Description
bool

IsDestroyed

Is entity is destroyed

Declaration
public bool IsDestroyed { get; }
Property Value
Type Description
bool

IsLocal

Is locally created entity

Declaration
public bool IsLocal { get; }
Property Value
Type Description
bool

IsLocalControlled

Is entity local controlled

Declaration
public bool IsLocalControlled { get; }
Property Value
Type Description
bool

IsRemoteControlled

Is entity remote controlled

Declaration
public bool IsRemoteControlled { get; }
Property Value
Type Description
bool

IsRemoved

Is entity released and not used after destroy.

Declaration
public bool IsRemoved { get; }
Property Value
Type Description
bool

IsServer

Is entity on server

Declaration
public bool IsServer { get; }
Property Value
Type Description
bool

IsServerControlled

Is entity is controlled by server

Declaration
public bool IsServerControlled { get; }
Property Value
Type Description
bool

IsSingleton

Is entity based on SingletonEntityLogic

Declaration
public bool IsSingleton { get; }
Property Value
Type Description
bool

OwnerId

Owner player id ServerPlayerId - 0 Singletons always controlled by server

Declaration
public byte OwnerId { get; }
Property Value
Type Description
byte

ServerManager

ServerEntityManager that available only on server. Will throw exception if called on client

Declaration
public ServerEntityManager ServerManager { get; }
Property Value
Type Description
ServerEntityManager

Methods

CompareTo(InternalEntity)

Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

Declaration
public int CompareTo(InternalEntity other)
Parameters
Type Name Description
InternalEntity other

An object to compare with this instance.

Returns
Type Description
int

A value that indicates the relative order of the objects being compared. The return value has these meanings:
Value

Meaning

Less than zero

This instance precedes other in the sort order.

Zero

This instance occurs in the same position in the sort order as other.

Greater than zero

This instance follows other in the sort order.

Destroy()

Destroy entity

Declaration
public void Destroy()

ExecuteRPC(in RemoteCall)

Declaration
protected void ExecuteRPC(in RemoteCall rpc)
Parameters
Type Name Description
RemoteCall rpc

ExecuteRPC<T>(in RemoteCallSerializable<T>, T)

Declaration
protected void ExecuteRPC<T>(in RemoteCallSerializable<T> rpc, T value) where T : struct, ISpanSerializable
Parameters
Type Name Description
RemoteCallSerializable<T> rpc
T value
Type Parameters
Name Description
T

ExecuteRPC<T>(in RemoteCallSpan<T>, ReadOnlySpan<T>)

Declaration
protected void ExecuteRPC<T>(in RemoteCallSpan<T> rpc, ReadOnlySpan<T> value) where T : unmanaged
Parameters
Type Name Description
RemoteCallSpan<T> rpc
ReadOnlySpan<T> value
Type Parameters
Name Description
T

ExecuteRPC<T>(in RemoteCall<T>, T)

Declaration
protected void ExecuteRPC<T>(in RemoteCall<T> rpc, T value) where T : unmanaged
Parameters
Type Name Description
RemoteCall<T> rpc
T value
Type Parameters
Name Description
T

GetHashCode()

Serves as the default hash function.

Declaration
public override int GetHashCode()
Returns
Type Description
int

A hash code for the current object.

Overrides
object.GetHashCode()

OnBeforeRollback()

Called at rollback begin before all values reset to first frame in rollback queue.

Declaration
protected virtual void OnBeforeRollback()

OnConstructed()

Called when entity constructed

Declaration
protected virtual void OnConstructed()

OnDestroy()

Event called on entity destroy

Declaration
protected virtual void OnDestroy()

OnRollback()

Called at rollback begin after all values reset to first frame in rollback queue.

Declaration
protected virtual void OnRollback()

RegisterRPC(ref RPCRegistrator)

Method for registering RPCs and OnChange notifications

Declaration
protected virtual void RegisterRPC(ref RPCRegistrator r)
Parameters
Type Name Description
RPCRegistrator r

ToString()

Returns a string that represents the current object.

Declaration
public override string ToString()
Returns
Type Description
string

A string that represents the current object.

Overrides
object.ToString()

Update()

Fixed update. Called if entity has attribute EntityFlagsAttribute and flag Updateable

Declaration
protected virtual void Update()

VisualUpdate()

Called only on Update() and if entity has attribute EntityFlagsAttribute and flag Updateable

Declaration
protected virtual void VisualUpdate()

Implements

IComparable<T>
In this article
Back to top Generated by DocFX