Counter

Enjoying Essential Systems?Leave a review

Learn to use the included counter.

Usage

public class Test : MonoBehaviour
{
    private Counter counter;

    private void Awake()
    {
        counter = new Counter(5); // 5 seconds
    }

    private void Update()
    {
        counter.Step(); // increments by Time.deltaTime

        if (counter.Done()) // returns true when finished, then resets
        {
            Debug.Log("Counter is done");
        }
    }
}
Last updated