Class HumanControllerLogic
Inheritance
object
HumanControllerLogic
Assembly: LiteEntitySystem.dll
Syntax
public abstract class HumanControllerLogic : ControllerLogic, IComparable<InternalEntity>
Constructors
HumanControllerLogic(EntityParams, int)
Declaration
protected HumanControllerLogic(EntityParams entityParams, int inputSize)
Parameters
Fields
FieldsDivision
Declaration
protected const int FieldsDivision = 2
Field Value
StringSizeLimit
Declaration
public const int StringSizeLimit = 1024
Field Value
Methods
ChangeEntityDiffSync(EntityLogic, bool)
Change entity delta-diff synchronization for player that owns this controller
constructor and destruction will be synchronized anyways
works only on server
Declaration
public void ChangeEntityDiffSync(EntityLogic entity, bool enable)
Parameters
Type |
Name |
Description |
EntityLogic |
entity |
entity
|
bool |
enable |
true - enable sync (if was disabled), disable otherwise
|
GetAssignedPlayer()
Get player that uses this controller
Declaration
public NetPlayer GetAssignedPlayer()
Returns
IsEntityDiffSyncDisabled(EntitySharedReference)
Is entity delta-diff synchronization disabled. Works on client and server
Declaration
public bool IsEntityDiffSyncDisabled(EntitySharedReference entity)
Parameters
Returns
Type |
Description |
bool |
true if entity sync is disabled
|
OnConstructed()
Called when entity constructed
Declaration
protected override void OnConstructed()
Overrides
OnDestroy()
Event called on entity destroy
Declaration
protected override void OnDestroy()
Overrides
OnEntityDiffSyncChanged(EntityLogic, bool)
Called when entity diff sync changed (enabled or disabled)
useful for hiding disabled entities
Declaration
protected virtual void OnEntityDiffSyncChanged(EntityLogic entity, bool enabled)
Parameters
Type |
Name |
Description |
EntityLogic |
entity |
entity
|
bool |
enabled |
sync enabled or disabled
|
RegisterClientCustomType<T>()
Declaration
protected void RegisterClientCustomType<T>() where T : struct, INetSerializable
Type Parameters
RegisterClientCustomType<T>(Action<NetDataWriter, T>, Func<NetDataReader, T>)
Declaration
protected void RegisterClientCustomType<T>(Action<NetDataWriter, T> writeDelegate, Func<NetDataReader, T> readDelegate)
Parameters
Type |
Name |
Description |
Action<NetDataWriter, T> |
writeDelegate |
|
Func<NetDataReader, T> |
readDelegate |
|
Type Parameters
RegisterRPC(ref RPCRegistrator)
Method for registering RPCs and OnChange notifications
Declaration
protected override void RegisterRPC(ref RPCRegistrator r)
Parameters
Overrides
ResetEntitiesDiffSync()
Enable diff sync for all entities that has disabled diff sync
Declaration
public void ResetEntitiesDiffSync()
SendRequestStruct<T>(T)
Declaration
protected void SendRequestStruct<T>(T request) where T : struct, INetSerializable
Parameters
Type |
Name |
Description |
T |
request |
|
Type Parameters
SendRequestStruct<T>(T, Action<bool>)
Declaration
protected void SendRequestStruct<T>(T request, Action<bool> onResult) where T : struct, INetSerializable
Parameters
Type |
Name |
Description |
T |
request |
|
Action<bool> |
onResult |
|
Type Parameters
SendRequest<T>(T)
Declaration
protected void SendRequest<T>(T request) where T : class, new()
Parameters
Type |
Name |
Description |
T |
request |
|
Type Parameters
SendRequest<T>(T, Action<bool>)
Declaration
protected void SendRequest<T>(T request, Action<bool> onResult) where T : class, new()
Parameters
Type |
Name |
Description |
T |
request |
|
Action<bool> |
onResult |
|
Type Parameters
SubscribeToClientRequestStruct<T>(Action<T>)
Declaration
protected void SubscribeToClientRequestStruct<T>(Action<T> onRequestReceived) where T : struct, INetSerializable
Parameters
Type |
Name |
Description |
Action<T> |
onRequestReceived |
|
Type Parameters
SubscribeToClientRequestStruct<T>(Func<T, bool>)
Declaration
protected void SubscribeToClientRequestStruct<T>(Func<T, bool> onRequestReceived) where T : struct, INetSerializable
Parameters
Type |
Name |
Description |
Func<T, bool> |
onRequestReceived |
|
Type Parameters
SubscribeToClientRequest<T>(Action<T>)
Declaration
protected void SubscribeToClientRequest<T>(Action<T> onRequestReceived) where T : class, new()
Parameters
Type |
Name |
Description |
Action<T> |
onRequestReceived |
|
Type Parameters
SubscribeToClientRequest<T>(Func<T, bool>)
Declaration
protected void SubscribeToClientRequest<T>(Func<T, bool> onRequestReceived) where T : class, new()
Parameters
Type |
Name |
Description |
Func<T, bool> |
onRequestReceived |
|
Type Parameters
Implements