Begin to split GameLogicScript. First up is Entity.

This commit is contained in:
hispidence 2022-02-02 19:49:57 +00:00
parent 6cc329f43f
commit 8bcc41ef77
13 changed files with 196 additions and 117 deletions

View file

@ -2,6 +2,7 @@
#include "ScriptInterfaceState.h"
#include "GameLogicScript.h"
#include "GameFlowScript.h"
#include "Entity/Entity.h"
sol::state g_solState;
@ -20,8 +21,14 @@ ScriptInterfaceFlow* ScriptInterfaceState::CreateFlow()
return new GameFlow(&g_solState);
}
ScriptInterfaceEntity* CreateEntities()
{
return new GameEntities(&g_solState);
}
void ScriptInterfaceState::Init()
{
g_solState.open_libraries(sol::lib::base, sol::lib::math);
g_solState.set_exception_handler(lua_exception_handler);
}