TargetCollector
A class in Root.Township, Alta.Intelligence.
Component that gathers targets for an agent within a radius. Registers itself with its agent on Awake; TargetCollectorManager adds and removes targets by distance.
- Listed in Creatures and AI
- Inherits or implements
MonoBehaviour,IBuildRendererBakeable,IBuildBakeable
Constructors
| Member | What it is |
|---|---|
TargetCollector() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
2 private and internal fields
Properties
| Member | What it is |
|---|---|
Agent Agent { get; } | The agent that receives the collected targets. |
Vector3 Position { get; private set; } | The agent's position as of the last GetPosition call. |
float RadiusSquared { get; } | Squared range within which targets are collected. Default 400, so a radius of 20. |
1 private and internal property
Methods
| Member | What it is |
|---|---|
Vector3 GetPosition() | Updates Position to the agent's current position and returns it. |
4 private and internal methods
Used in
Members of other types that take, return or hold a TargetCollector: