Table of Contents

Class ControllerLogic

Namespace
LiteEntitySystem
Assembly
LiteEntitySystem.dll

Base class for Controller entities

[EntityFlags(EntityFlags.OnlyForOwner)]
public abstract class ControllerLogic : InternalEntity, IComparable<InternalEntity>
Inheritance
object
ControllerLogic
Implements
Derived
Inherited Members
Extension Methods

Constructors

ControllerLogic(EntityParams)

protected ControllerLogic(EntityParams entityParams)

Parameters

entityParams EntityParams

Properties

IsBot

Is controller - AI controller

public abstract bool IsBot { get; }

Property Value

bool

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

T

pawn type

OnControlledEntityChanged(PawnLogic)

Called when ControlledEntity changed

protected virtual void OnControlledEntityChanged(PawnLogic prevPawn)

Parameters

prevPawn PawnLogic

previous controlled entity

RegisterRPC(ref RPCRegistrator)

Method for registering RPCs and OnChange notifications

protected override void RegisterRPC(ref RPCRegistrator r)

Parameters

r RPCRegistrator

StartControl(PawnLogic)

Start control pawn

public void StartControl(PawnLogic target)

Parameters

target PawnLogic

StopControl()

Stop control pawn

public void StopControl()