blob: 383bac11906d9315947c268eeb5d82bf3ae838ec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
#pragma once
enum class ScriptStatus
{
None,
Loaded,
Failed,
};
class CMLuaScript : public CMLuaEnvironment
{
private:
wchar_t *scriptName;
wchar_t filePath[MAX_PATH];
bool isBinary;
ScriptStatus status;
int unloadRef;
public:
CMLuaScript(lua_State *L, const wchar_t *path);
CMLuaScript(const CMLuaScript &script);
~CMLuaScript();
const wchar_t* GetFilePath() const;
const wchar_t* GetName() const;
bool IsBinary() const;
bool IsEnabled() const;
void Enable();
void Disable();
ScriptStatus GetStatus() const;
int Load() override;
int Unload() override;
bool Reload();
bool Compile();
};
|