mirror of
https://github.com/devZoGok/gameBase.git
synced 2026-08-26 19:43:28 +00:00
17 lines
236 B
C++
17 lines
236 B
C++
#include "solUtil.h"
|
|
|
|
namespace gameBase{
|
|
static lua_State *state = nullptr;
|
|
|
|
sol::state_view generateView(){
|
|
if(!state){
|
|
state = luaL_newstate();
|
|
luaL_openlibs(state);
|
|
}
|
|
|
|
sol::state_view view(state);
|
|
return view;
|
|
}
|
|
}
|
|
|