Class ControllerLogic
- Namespace
- LiteEntitySystem
- Assembly
- LiteEntitySystem.dll
Base class for Controller entities
[EntityFlags(EntityFlags.OnlyForOwner)]
public abstract class ControllerLogic : InternalEntity, IComparable<InternalEntity>
- Inheritance
-
objectControllerLogic
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
ControllerLogic(EntityParams)
protected ControllerLogic(EntityParams entityParams)
Parameters
entityParamsEntityParams
Properties
IsBot
Is controller - AI controller
public abstract bool IsBot { get; }
Property Value
Methods
BeforeControlledUpdate()
Called before controlled entity update. Useful for input
protected virtual void BeforeControlledUpdate()
DestroyWithControlledEntity()
Destroy controller and controlled pawn
public void DestroyWithControlledEntity()
GetControlledEntity<T>()
Controlled pawn
public T GetControlledEntity<T>() where T : PawnLogic
Returns
- T
controlled pawn
Type Parameters
Tpawn type
OnControlledEntityChanged(PawnLogic)
Called when ControlledEntity changed
protected virtual void OnControlledEntityChanged(PawnLogic prevPawn)
Parameters
prevPawnPawnLogicprevious controlled entity
RegisterRPC(ref RPCRegistrator)
Method for registering RPCs and OnChange notifications
protected override void RegisterRPC(ref RPCRegistrator r)
Parameters
StartControl(PawnLogic)
Start control pawn
public void StartControl(PawnLogic target)
Parameters
targetPawnLogic
StopControl()
Stop control pawn
public void StopControl()