Skip to main content

InverseLerpSenseSelf

A class in Root.Township, Alta.Intelligence.

Scoring rule that reads a sense with the creature as both requester and target, mapped onto 0 to 1. Made by CreateTargetOperation.Sense with isTarget false.

Constructors​

MemberWhat it is
InverseLerpSenseSelf(Sense sense, float from, float to)Creates an InverseLerpSenseSelf from sense, from and to.

Fields​

3 private and internal fields
MemberWhat it is
private float fromSense value that maps to 0.
private Sense senseThe sense asset read.
private float toSense value that maps to 1.

Methods​

MemberWhat it is
override float Evaluate(Agent agent, ITarget target)Returns the sense's value for the creature itself, inverse-lerped from from to to and clamped. The target is ignored.
override string ToString()Returns "Sense Self (name)".