Skip to main content

OldSenseOperation

A class in Root.Township, Alta.Intelligence.

Older prefab scoring component that names its sense with the SenseOld enum. In the editor it replaces itself with a SenseOperation once a matching sense asset exists.

Constructors​

MemberWhat it is
OldSenseOperation()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

5 private and internal fields
MemberWhat it is
private float fromSense value that maps to 0.
private bool isTargetRead the sense on the target (true) or on the creature itself.
private float multiplierWeight of the rule. Only matters for preferred rules.
private SenseOld senseThe old enum value naming the sense.
private float toSense value that maps to 1.

Methods​

MemberWhat it is
override TargetOperation GetOperation()Makes a sense rule for the sense asset mapped to this SenseOld value.
static void Migrate(Component old, SenseOld sense, float from, float to, bool isTarget, float multiplier)Editor: moves an old scoring component's settings onto a SenseOperation, or onto an OldSenseOperation if no sense asset matches.
protected override string GetName()Builds the GameObject name, like Danger 0 -> 1 (x1).
protected override void OnValidate()Editor: renames the GameObject and migrates to a SenseOperation if possible.