C# Class Nez.Systems.CoroutineManager

basic CoroutineManager. Coroutines can do the following: - yield return null (tick again the next frame) - yield return Coroutine.waitForSeconds( 3 ) (tick again after a 3 second delay) - yield return Coroutine.waitForSeconds( 5.5f ) (tick again after a 5.5 second delay) - yield return startCoroutine( another() ) (wait for the other coroutine before getting ticked again)
Inheritance: IUpdatableManager
Datei anzeigen Open project: prime31/Nez

Public Methods

Method Description
startCoroutine ( IEnumerator enumerator ) : ICoroutine

adds the IEnumerator to the CoroutineManager. Coroutines get ticked before Update is called each frame.

Private Methods

Method Description
IUpdatableManager ( ) : void
tickCoroutine ( CoroutineImpl coroutine ) : bool

ticks a coroutine. returns true if the coroutine should continue to run next frame. This method will put finished coroutines back in the Pool!

Method Details

startCoroutine() public method

adds the IEnumerator to the CoroutineManager. Coroutines get ticked before Update is called each frame.
public startCoroutine ( IEnumerator enumerator ) : ICoroutine
enumerator IEnumerator Enumerator.
return ICoroutine