ProgressorGroup
class in Doozy.Engine.Progress / Inherits from MonoBehaviour
Description
Progressor Groups are useful if you need the mean progress value of two or more progress values.
E.g. Progressor Group (PG) has two Progressors (P1 and P2). If P1 progress = 1f and P2 progress = 0f then PG progress = 0.5f.
Public Variables
-
?public bool DebugMode – Enables relevant debug messages to be printed to the console
-
public List<Progressor> Progressors – ~Progressor sources that this ProgressorGroup listens for, to calculate the arithmetic mean of all their progress values
-
public ProgressEvent OnProgressChanged – Callback executed when the Progress value has been updated. Passes the Progress value (float between 0 and 1)
-
public ProgressEvent OnInverseProgressChanged – Callback executed when the Progress value has been updated. Passes the InverseProgress value (float between 1 and 0). InverseProgress = 1 – Progress
Public Methods
-
public void UpdateProgress() – Updates the progress value by checking all the Progressors Progress values
-
public float GetProgress(TargetProgress direction) – Depending on the direction, returns either the Progress or the InverseProgress value