C# Класс Kore.Coroutines.StateCache

Показать файл Открыть проект

Открытые методы

Метод Описание
Change ( IEnumerator nextState ) : IYieldable

Suspend (permanently stop) execution of current coroutine and start a new one, this is equivalent to exiting a state and entering another state. It also allow "EnterState" to trigger again its callback once it will be executed.

Change ( IEnumerator nextState, KoreCallback onExitState ) : IYieldable

Suspend (permanently stop) execution of current coroutine and start a new one, this is equivalent to exiting a state and entering another state. It also allow "EnterState" to trigger again its callback once it will be executed. This method also have callback

EnterState ( ) : IYieldable

Prefer yielding this function instead of "null" to have a code that is more clear about its intent

EnterState ( KoreCallback onEnterState ) : IYieldable

Prefer yielding this function instead of "null" to have a code that is more clear about its intent, also the callback will be executed only once when the state is entered

Event ( ) : StateEvent

A simple notification mechanism that can be polled like a input to detect state changes.

Приватные методы

Метод Описание
StateCache ( ) : Kore.Utils

Описание методов

Change() публичный Метод

Suspend (permanently stop) execution of current coroutine and start a new one, this is equivalent to exiting a state and entering another state. It also allow "EnterState" to trigger again its callback once it will be executed.
public Change ( IEnumerator nextState ) : IYieldable
nextState IEnumerator Next coroutine to be runned
Результат IYieldable

Change() публичный Метод

Suspend (permanently stop) execution of current coroutine and start a new one, this is equivalent to exiting a state and entering another state. It also allow "EnterState" to trigger again its callback once it will be executed. This method also have callback
public Change ( IEnumerator nextState, KoreCallback onExitState ) : IYieldable
nextState IEnumerator Next coroutine to be runned
onExitState KoreCallback Callback (Executed immediatly).
Результат IYieldable

EnterState() публичный Метод

Prefer yielding this function instead of "null" to have a code that is more clear about its intent
public EnterState ( ) : IYieldable
Результат IYieldable

EnterState() публичный Метод

Prefer yielding this function instead of "null" to have a code that is more clear about its intent, also the callback will be executed only once when the state is entered
public EnterState ( KoreCallback onEnterState ) : IYieldable
onEnterState KoreCallback Callback (Executed immediatly).
Результат IYieldable

Event() публичный Метод

A simple notification mechanism that can be polled like a input to detect state changes.
public Event ( ) : StateEvent
Результат StateEvent