Files
Bomberman/lib/LuaGate/LuaGate.cpp
T
2021-06-11 09:34:22 +02:00

34 lines
451 B
C++

//
// Created by Louis Auzuret on 10/06/21
//
#include "LuaGate.hpp"
namespace LuaG
{
State::State()
: _state(luaL_newstate())
{
luaL_openlibs(_state);
}
State::~State()
{
lua_close(_state);
}
LuaState *State::getState(void)
{
return _state;
}
void State::dofile(std::string filepath)
{
luaL_dofile(_state, filepath.c_str());
}
void State::dostring(std::string str)
{
luaL_dostring(_state, str.c_str());
}
}