通过本文主要向大家介绍了startcoroutine,coroutine,unity startcoroutine,lua coroutine,unity coroutine等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
平台:linux
依赖:g++ supports c++0x
void func2(Coro_t co1)
{
coroutine.resume(co1);
coroutine.yield();
}
void func()
{
Coro_t co1 = coroutine.create(std::bind(&func1));
coroutine.resume(co1);
Coro_t co2 = coroutine.create(std::bind(&func2, co1));
coroutine.resume(co2);
coroutine.resume(co2);
}
int main()
{
Coro_t co = coroutine.create(std::bind(&func));
coroutine.resume(co);
return 0;
}
</div>