diff options
Diffstat (limited to 'src/lua/modules/time')
-rw-r--r-- | src/lua/modules/time/je_lua_time.cpp | 2 | ||||
-rw-r--r-- | src/lua/modules/time/je_lua_timer.cpp | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/lua/modules/time/je_lua_time.cpp b/src/lua/modules/time/je_lua_time.cpp index 1d8b852..cd49978 100644 --- a/src/lua/modules/time/je_lua_time.cpp +++ b/src/lua/modules/time/je_lua_time.cpp @@ -33,7 +33,7 @@ namespace JinEngine LUA_IMPLEMENT int l_newTimer(lua_State* L) { - Shared* shrTimer = new Shared(new Timer(), Jin_Lua_Timer); + Shared* shrTimer = new Shared(new Timer()); luax_newinstance(L, Jin_Lua_Timer, shrTimer); return 1; } diff --git a/src/lua/modules/time/je_lua_timer.cpp b/src/lua/modules/time/je_lua_timer.cpp index f689277..e30baab 100644 --- a/src/lua/modules/time/je_lua_timer.cpp +++ b/src/lua/modules/time/je_lua_timer.cpp @@ -42,7 +42,7 @@ namespace JinEngine for(int i = 4; i <= n; ++i) func->pushParam(i); Timer::Handler* handler = shared->every(s, timerCallback, func, finishCallback); - Shared* shrHandler = new Shared(handler, Jin_Lua_Handler); + Shared* shrHandler = new Shared(handler); LuaObject* luaObj = luax_newinstance(L, Jin_Lua_Handler, shrHandler); return 1; } @@ -58,7 +58,7 @@ namespace JinEngine for (int i = 4; i <= n; ++i) func->pushParam(i); Timer::Handler* handler = shared->after(s, timerCallback, func, finishCallback); - Shared* shrHandler = new Shared(handler, Jin_Lua_Handler); + Shared* shrHandler = new Shared(handler); LuaObject* luaObj = luax_newinstance(L, Jin_Lua_Handler, shrHandler); return 1; } @@ -75,7 +75,7 @@ namespace JinEngine for (int i = 5; i <= n; ++i) func->pushParam(i); Timer::Handler* handler = shared->repeat(s, count, timerCallback, func, finishCallback); - Shared* shrHandler = new Shared(handler, Jin_Lua_Handler); + Shared* shrHandler = new Shared(handler); LuaObject* luaObj = luax_newinstance(L, Jin_Lua_Handler, shrHandler); return 1; } @@ -125,7 +125,6 @@ namespace JinEngine { "cancelAll", l_cancelAll }, { 0, 0 } }; - luax_newtype(L, Jin_Lua_Timer, methods); } |