Skip to main content

ILinkedAgent

An interface in Root.Township, Alta.Intelligence.

What AgentUpdater needs from a creature AI to schedule it. Agent implements it explicitly; agents are kept in a linked list sorted by priority.

Properties​

MemberWhat it is
NetworkEntity Entity { get; }The agent's network entity. Agents whose entity is gone or being destroyed are dropped from the list.
LinkedListNode<ILinkedAgent> Node { get; set; }The agent's node in the updater's list. Null when not registered.
int Priority { get; set; }How urgently the agent needs a decision. Reset to 0 after each check and raised by the updater over time.

Methods​

MemberWhat it is
bool CheckChange()Called for the highest priority agents each update. Returns true if the agent re-chose its action (its next decision time had passed).
void UpdateAgent()Runs the agent's current action for this frame, after updating hurt state and checking the target still exists.

Used in​

Members of other types that take, return or hold a ILinkedAgent: