Lua Sample 12 coroutine usage
SirNate0 opened this issue · 1 comments
SirNate0 commented
Sample 12 is using a coroutine to create the falling physics objects. However, I think it is doing this incorrectly. The call is coroutine.start(function() ...
, but I believe this should be coroutine.create(function() ...
. Can someone who has experience with Lua confirm this? I'm just basing it off of https://www.lua.org/pil/9.1.html and the lack of a "start" function being listed in static const luaL_Reg co_funcs[] = {
.
SirNate0 commented
The call as is is correct, though it is due to our additions. The coroutine.start
and similar are defined in our tolua bindings: Source/Urho3D/LuaScript/pkgs/LuaScript/Coroutine.pkg