Class HumanControllerLogic<TInput>
Base class for human Controller entities
Inheritance
HumanControllerLogic<TInput>
Assembly: LiteEntitySystem.dll
Syntax
[EntityFlags(EntityFlags.UpdateOnClient)]
public abstract class HumanControllerLogic<TInput> : HumanControllerLogic, IComparable<InternalEntity> where TInput : unmanaged
Type Parameters
Constructors
HumanControllerLogic(EntityParams)
Declaration
protected HumanControllerLogic(EntityParams entityParams)
Parameters
Fields
StringSizeLimit
Declaration
public const int StringSizeLimit = 1024
Field Value
Properties
Input that created by ReadInput before all entity updates
Declaration
public TInput CurrentInput { get; }
Property Value
IsBot
Is controller - AI controller
Declaration
public override bool IsBot { get; }
Property Value
Overrides
Methods
Called on client to generate input
Declaration
protected abstract void GenerateInput(out TInput input)
Parameters
Type |
Name |
Description |
TInput |
input |
|
GetAssignedPlayer()
Get player that uses this controller
Declaration
public NetPlayer GetAssignedPlayer()
Returns
Declaration
protected abstract void ReadInput(in TInput input)
Parameters
Type |
Name |
Description |
TInput |
input |
user defined input structure
|
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
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