Skip to main content
Version: 0.14.0

Agent Service

Description

This is the core of what an agent is and should be used for all interactions of a specific agent. It provides access to a specific agent set of services meaning anything it has will only effect a single agent within the scene.

Interface

BardTreeLtd.CivilAiSystem.Agent.IAgentService

Inherits

Type
BardTreeLtd.Shared.Agent.IAgentService
IMonoBehaviour

The agent's sub-services are reached through the Get... methods below rather than through public fields.

Public Methods

NameParametersReturn TypeDescription
SetupIBehaviourApplicator[], IActionService, ILookingServiceboolCalled to start initialisation of an agent.
TryRehydrateRuntimeServicesN/AboolRebuilds the agent's runtime services, for example after a load.
HasRuntimeBehaviourControllersN/AboolWhether the agent's behaviour controllers are present and running.
UpdateProcessITimeServiceboolUsed by the agent OrchestratorService to update agents.
ResetN/AboolUsed to reset the state and actionProcessor.
GetControllerServiceN/AIBehaviourServiceProvides the IBehaviourService for the agent.
GetAgentStateN/AIAgentStateProvides the IAgentState for the agent.
GetActionProcessorN/AIAgentActionProcessorProvides the IAgentActionProcessor for the agent.
GetOwnershipServiceN/AIOwnershipServiceProvides the IOwnershipService for the agent.
GetApplicatorServiceN/AIApplicatorServiceProvides the IApplicatorService for the agent.
GetPauseServiceN/AIPauseServiceProvides the IPauseService for the agent.
GetRendererControllerN/ARendererControllerProvides the RendererController for the agent.
GetIDN/AstringA method for getting the agent's unique id.

Inherited from the shared agent service

NameParametersReturn TypeDescription
GetBlackboardServiceN/AIBlackboardServiceProvides the agent's blackboard.
GetDisplayNameN/AstringThe agent's display name, as shown to players.

Static Methods

NameParametersReturn TypeDescription
SetObjectRepositoryServiceIObjectRepositoryService<T>voidSets the object repository service used to find agents.