Learn / Documentation / Script Reference / ProgressorGroup

ProgressorGroup

class in Doozy.Engine.Progress / Inherits from MonoBehaviour

Description

The ProgressorGroup class calculates the arithmetic mean of all the progress values of all the referenced Progressors.

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.
See Also: Progressor
Gesture Listener
Gesture Listener
Gesture Listener

Properties

  • public float Progress – Returns the current progress value (float between 0 and 1)

  • public float InverseProgress – Returns the inverse value of current Progress value (float between 1 and 0)

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