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
| Name | Parameters | Return Type | Description |
|---|---|---|---|
| Setup | IBehaviourApplicator[], IActionService, ILookingService | bool | Called to start initialisation of an agent. |
| TryRehydrateRuntimeServices | N/A | bool | Rebuilds the agent's runtime services, for example after a load. |
| HasRuntimeBehaviourControllers | N/A | bool | Whether the agent's behaviour controllers are present and running. |
| UpdateProcess | ITimeService | bool | Used by the agent OrchestratorService to update agents. |
| Reset | N/A | bool | Used to reset the state and actionProcessor. |
| GetControllerService | N/A | IBehaviourService | Provides the IBehaviourService for the agent. |
| GetAgentState | N/A | IAgentState | Provides the IAgentState for the agent. |
| GetActionProcessor | N/A | IAgentActionProcessor | Provides the IAgentActionProcessor for the agent. |
| GetOwnershipService | N/A | IOwnershipService | Provides the IOwnershipService for the agent. |
| GetApplicatorService | N/A | IApplicatorService | Provides the IApplicatorService for the agent. |
| GetPauseService | N/A | IPauseService | Provides the IPauseService for the agent. |
| GetRendererController | N/A | RendererController | Provides the RendererController for the agent. |
| GetID | N/A | string | A method for getting the agent's unique id. |
Inherited from the shared agent service
| Name | Parameters | Return Type | Description |
|---|---|---|---|
| GetBlackboardService | N/A | IBlackboardService | Provides the agent's blackboard. |
| GetDisplayName | N/A | string | The agent's display name, as shown to players. |
Static Methods
| Name | Parameters | Return Type | Description |
|---|---|---|---|
| SetObjectRepositoryService | IObjectRepositoryService<T> | void | Sets the object repository service used to find agents. |
Related guides
- Introduction to Behaviours — what drives an agent's decisions
- Populating — how agents get into the scene in the first place