DistanceOperation
A class in Root.Township, Alta.Intelligence.
Older prefab scoring component for the target's distance (or squared distance). In the editor it migrates itself to a SenseOperation.
- Listed in Creatures and AI
- Inherits or implements
TargetOperationComponent
Constructors
| Member | What it is |
|---|---|
DistanceOperation() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
4 private and internal fields
Methods
| Member | What it is |
|---|---|
override TargetOperation GetOperation() | Makes a target sense rule on the Distance or DistanceSquared sense, from from to to, weighted by multiplier. |
protected override string GetName() | Builds the GameObject name, like Distance 0 -> 1 (x1). |
protected override void OnValidate() | Editor: renames the GameObject and migrates the settings to a SenseOperation (or OldSenseOperation). |