mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-05-06 19:01:06 +03:00
Clean up GameLogicScript.
Add some new member functions, ResetLevelTables and GetLevelFunc. The former is called in FreeLevelScripts, which is now called in control.cpp. Remove AddTrigger, as the LevelFuncs table takes care of triggers.
This commit is contained in:
parent
369e4c7562
commit
9bf5c361e2
3 changed files with 33 additions and 42 deletions
|
@ -65,11 +65,13 @@ private:
|
|||
sol::protected_function m_onControlPhase{};
|
||||
sol::protected_function m_onSave{};
|
||||
sol::protected_function m_onEnd{};
|
||||
|
||||
void ResetLevelTables();
|
||||
|
||||
public:
|
||||
GameScript(sol::state* lua);
|
||||
|
||||
void FreeLevelScripts();
|
||||
void AddTrigger(LuaFunction* function);
|
||||
|
||||
bool AddLuaNameItem(std::string const & luaName, short itemNumber);
|
||||
bool RemoveLuaNameItem(std::string const& luaName);
|
||||
|
@ -90,6 +92,7 @@ public:
|
|||
bool RemoveLuaNameAIObject(std::string const& luaName);
|
||||
|
||||
bool SetLevelFunc(sol::table tab, std::string const& luaName, sol::object obj);
|
||||
sol::protected_function GetLevelFunc(sol::table tab, std::string const& luaName);
|
||||
|
||||
void AssignItemsAndLara();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue