mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-05-06 19:01:06 +03:00
Implemented LUA trigger
This commit is contained in:
parent
63534298ed
commit
59c02796cb
4 changed files with 48 additions and 9 deletions
|
@ -10,6 +10,12 @@
|
|||
|
||||
using namespace std;
|
||||
|
||||
typedef struct LuaFunction {
|
||||
string Name;
|
||||
string Code;
|
||||
bool Executed;
|
||||
};
|
||||
|
||||
class GameScript
|
||||
{
|
||||
private:
|
||||
|
@ -19,12 +25,15 @@ private:
|
|||
map<__int16, __int16> m_itemsMap;
|
||||
|
||||
public:
|
||||
vector<LuaFunction*> Triggers;
|
||||
|
||||
GameScript(sol::state* lua);
|
||||
~GameScript();
|
||||
|
||||
|
||||
bool ExecuteScript(char* luaFilename);
|
||||
void EnableItem(__int16 id);
|
||||
void DisableItem(__int16 id);
|
||||
void PlayAudioTrack(__int16 track);
|
||||
void ChangeAmbientSoundTrack(__int16 track);
|
||||
bool ExecuteTrigger(__int16 index);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue