Async
- class Varwin.Async
Базовые классы:
objectУправление асинхронными методами.
- static Run(coroutine: CoroutineType) None
Запускает предоставленную сопрограмму.
- Параметры:
coroutine – корутина без возвращаемого значения
Пример:
Varwin.Async.Run(Chain1())
- static AddStart(handler: Callable[[], CoroutineType]) None
Adds a handler function to be called during scene preparation.
- Параметры:
handler – Asynchronous handler function
Пример:
async def OnStart(): ... Varwin.Async.AddStart(OnStart)
- static AddUpdate(handler: Callable[[], CoroutineType]) None
Adds a handler function that will be called every frame.
- Параметры:
handler – Asynchronous handler function
Пример:
async def OnUpdate(): ... Varwin.Async.AddUpdate(OnUpdate)