C# Class SpicyPixel.Threading.SystemCoroutine

This static class exposes convenience coroutines that can be passed to a fiber or task.
Show file Open project: spicypixel/concurrency-kit-cs

Public Methods

Method Description
RepeatForIterations ( Action action, int iterations ) : IEnumerator

Convenience coroutine to repeat an action for the specified number of iterations at the scheduler frequency.

Private Methods

Method Description
RepeatForSeconds ( Action action, float seconds ) : IEnumerator

Convenience coroutine to repeat an action for the specified duration at the scheduler frequency.

This is internal until there is a scheduler agnostic way to handle delta time.

YieldForSeconds ( float seconds ) : FiberInstruction

Convenience coroutine to send a YieldForSeconds instruction to the scheduler and wait on it to complete.

Method Details

RepeatForIterations() public static method

Convenience coroutine to repeat an action for the specified number of iterations at the scheduler frequency.
public static RepeatForIterations ( Action action, int iterations ) : IEnumerator
action Action /// The action to execute. ///
iterations int /// The iterations to execute for. ///
return IEnumerator