Progressor Group

Code examples to perform various interactions with the Progressor Group

Get Progress

Depending on the direction (TargetProgress), returns either the Progress or the InverseProgress value

using Doozy.Engine.Progress;
using UnityEngine;

public class ExampleClass : MonoBehaviour
{
    public ProgressorGroup MyProgressorGroup;

    private void Start()
    {
        float progressValue = MyProgressorGroup.GetProgress(TargetProgress.Progress); //value between 0 and 1
        float inverseProgressValue = MyProgressorGroup.GetProgress(TargetProgress.InverseProgress); //value between 1 and 0
    }
}

Upgrade Progress

Update the progress value by checking all the Progressors Progress values

using Doozy.Engine.Progress;
using UnityEngine;

public class ExampleClass : MonoBehaviour
{
    public ProgressorGroup MyProgressorGroup;

    private void Start()
    {
        MyProgressorGroup.UpdateProgress();
    }
}