move lua libs to /logic/scripting/lua/libs

This commit is contained in:
MihailRis
2024-10-05 00:53:41 +03:00
parent d31a935009
commit 736fdbf964
31 changed files with 6 additions and 6 deletions
+16
View File
@@ -0,0 +1,16 @@
#include "engine.hpp"
#include "window/Window.hpp"
#include "api_lua.hpp"
static int l_time_uptime(lua::State* L) {
return lua::pushnumber(L, Window::time());
}
static int l_time_delta(lua::State* L) {
return lua::pushnumber(L, scripting::engine->getDelta());
}
const luaL_Reg timelib[] = {
{"uptime", lua::wrap<l_time_uptime>},
{"delta", lua::wrap<l_time_delta>},
{NULL, NULL}};