You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
880 B
C
33 lines
880 B
C
|
4 years ago
|
/******************************************************************************
|
||
|
|
* File - scriptManager.h
|
||
|
|
* Author - Joey Pollack
|
||
|
|
* Date - 2021/08/30 (y/m/d)
|
||
|
|
* Mod Date - 2021/09/02 (y/m/d)
|
||
|
|
* Description - Manage the main LUA state, Run given scripts and check for
|
||
|
|
* errors. Report errors in the debug log. Also keep a
|
||
|
|
* history of errors that can be queried.
|
||
|
|
******************************************************************************/
|
||
|
|
|
||
|
|
#ifndef SCRIPT_MANAGER_H_
|
||
|
|
#define SCRIPT_MANAGER_H_
|
||
|
|
|
||
|
|
#include <sol/sol.hpp>
|
||
|
|
#include <utils/opRes.h>
|
||
|
|
|
||
|
|
namespace lunarium
|
||
|
|
{
|
||
|
|
class ScriptManager
|
||
|
|
{
|
||
|
|
public:
|
||
|
|
static ScriptManager& GetInstance();
|
||
|
|
static void FreeInstance();
|
||
|
|
|
||
|
|
OpRes Initialize();
|
||
|
|
|
||
|
|
private:
|
||
|
|
static ScriptManager* mpInstance;
|
||
|
|
sol::state mState;
|
||
|
|
};
|
||
|
|
}
|
||
|
|
|
||
|
|
#endif // SCRIPT_MANAGER_H_
|