Class InternalEntity
Implements
Namespace: LiteEntitySystem.Internal
Assembly: LiteEntitySystem.dll
Syntax
public abstract class InternalEntity : 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 |
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 |
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 |
IsServerControlled
Is entity is controlled by server
Declaration
public bool IsServerControlled { get; }
Property Value
Type | Description |
---|---|
bool |
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
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 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
OnConstructed()
Called when entity constructed
Declaration
protected virtual void OnConstructed()
OnDestroy()
Event called on entity destroy
Declaration
protected virtual void OnDestroy()
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
Update()
Fixed update. Called if entity has attribute UpdateableEntity
Declaration
protected virtual void Update()
VisualUpdate()
Called only on Update() and if entity has attribute UpdateableEntity
Declaration
protected virtual void VisualUpdate()