Skip to main content

Lifetime

A class in Root.Township, Alta.Intelligence.

Scoring rule on the creature's age: seconds since it was created, mapped from minimum to maximum onto 0 to 1. Made by CreateTargetOperation.Lifetime.

Constructors​

MemberWhat it is
Lifetime(float minimum, float maximum)Creates a Lifetime from minimum and maximum.

Fields​

2 private and internal fields
MemberWhat it is
private float maximumAge in seconds that maps to 1.
private float minimumAge in seconds that maps to 0.

Methods​

MemberWhat it is
override float Evaluate(Agent agent, ITarget target)Returns the inverse lerp of the creature's age between minimum and maximum. The target is ignored.