Skip to main content

ProgressStatChangeHook.TopicProgress

A private struct in Root.Township, Alta.Intelligence. Reach it through att-stubs' publicized assemblies or Harmony's AccessTools.

Tracks one agent's stat change over time for a ProgressStatChangeHook, adding the curve's value to the stat's base each frame.

Constructors​

MemberWhat it is
TopicProgress(float inverseDuration, ProgressStatChangeHook hook, IAgent topic)Creates a ProgressStatChangeHook.TopicProgress from inverseDuration, hook and topic.

Fields​

6 private and internal fields
MemberWhat it is
private Stat affectedStatThe agent's stat being changed.
private float currentlyAddedTotal amount added to the stat so far.
private ProgressStatChangeHook hookThe hook that owns this progress and supplies the curve.
private float inverseDurationTime scale for the curve: one over the action duration when time is normalized, else 1.
private float startTimeReal time the progress started.
private IUnityUpdateMethod updateStatHandle for the registered update method.

Methods​

MemberWhat it is
void Dispose(bool removeOnEnd)Stops the update and, if asked, takes back everything it added.
1 private and internal method
MemberWhat it is
private void UpdateStat()Each frame, moves the stat's base by the change in the hook's curve since the last frame.

Used in​

Members of other types that take, return or hold a TopicProgress: