aboutsummaryrefslogtreecommitdiff
path: root/src/lua/modules/time/je_lua_timer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua/modules/time/je_lua_timer.cpp')
-rw-r--r--src/lua/modules/time/je_lua_timer.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/lua/modules/time/je_lua_timer.cpp b/src/lua/modules/time/je_lua_timer.cpp
new file mode 100644
index 0000000..c28aafe
--- /dev/null
+++ b/src/lua/modules/time/je_lua_timer.cpp
@@ -0,0 +1,30 @@
+#include "../types.h"
+#include "lua/common/je_lua_common.h"
+#include "je_lua_timer.h"
+
+namespace JinEngine
+{
+ namespace Lua
+ {
+
+ typedef Shared<Timer>& TimerRef;
+
+ LUA_IMPLEMENT inline TimerRef checkTimer(lua_State* L)
+ {
+ Proxy* proxy = (Proxy*)luax_checktype(L, 1, JIN_TIME_TIMER);
+ return proxy->getShared<Timer>();
+ }
+
+ LUA_IMPLEMENT int l_every(lua_State* L)
+ {
+ //TimerRef ref = checkTimer(L);
+ //Timer* timer = ref.getObject();
+ //int n = luax_checkinteger(L, 1);
+ //int ref = luax_ref(L, 2);
+ //timer->every(n, [](void* data)->void {
+ //
+ //}, );
+ }
+
+ }
+} \ No newline at end of file