mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-05-10 20:46:47 +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
73eb96ee39
commit
ef9a74d5e0
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