A class in Root.Township, Alta.Intelligence.
Prefab scoring component that adds a sense rule: a sense asset read on the target or the creature, mapped onto 0 to 1. The older scoring components migrate to this one.
Constructors
| Member | What it is |
|---|
SenseOperation() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
5 private and internal fields
| Member | What it is |
|---|
private float from | Sense value that maps to 0. |
private bool isTarget | Read the sense on the target (true) or on the creature itself. |
private float multiplier | Weight of the rule. Only matters for preferred rules. |
private Sense sense | The sense asset read. |
private float to | Sense value that maps to 1 (default 1). |
Methods
| Member | What it is |
|---|
override TargetOperation GetOperation() | Makes the sense rule with these settings, weighted by multiplier. |
static void Migrate(Component old, Sense sense, float from, float to, bool isTarget, float multiplier) | Editor: adds or reuses a SenseOperation on the old component's GameObject and copies the settings over. |
protected override string GetName() | Builds the GameObject name, like Danger 0 -> 1 (x1). |