first commit of some basics
This commit is contained in:
22
TSE_Base/src/LuaStateHandler.hpp
Normal file
22
TSE_Base/src/LuaStateHandler.hpp
Normal file
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
|
||||
#include <lua5.4/lua.hpp>
|
||||
#include "LuaBridge.h"
|
||||
#include "Types.hpp"
|
||||
|
||||
#define TSE_LUA_STATE TSE::LuaStateHandler::L
|
||||
#define TSE_LUA_RUN_COMMAND(cmd) TSE::LuaStateHandler::RunLuaString(cmd)
|
||||
#define TSE_LUA_RUN_SCRIPT(path) TSE::LuaStateHandler::RunLuaScript(path)
|
||||
|
||||
namespace TSE
|
||||
{
|
||||
class LuaStateHandler
|
||||
{
|
||||
public:
|
||||
static inline lua_State* L;
|
||||
|
||||
static void InitLuaState();
|
||||
static void RunLuaString(string cmd);
|
||||
static void RunLuaScript(string path);
|
||||
};
|
||||
} // namespace TSE
|
||||
Reference in New Issue
Block a user