Delegate Activation Timer (Example)


/ Published in: C#
Save to your folder(s)

A timer that activates a delegate after a set amount of time. Coded for Unity. This example shows the implementation of an event where all subscribed methods are activated every second. For methods with more elaborate signatures, new delegates will have to be added.

The public IEnumerator can be started from external classes using "StartCoroutine()" and can be passed methods from that class matching the TimerCallbacks delegate signature.

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.