-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLuaScriptManager.h
More file actions
43 lines (28 loc) · 866 Bytes
/
LuaScriptManager.h
File metadata and controls
43 lines (28 loc) · 866 Bytes
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
42
43
// Copyright 2006-12 HumaNature Studios Inc.
#ifndef __LUASCRIPTMANAGER_H__
#define __LUASCRIPTMANAGER_H__
#include "LuaContext.h"
namespace core {
class LuaContext;
class LuaScriptManager
: public MemoryObject
, public Singleton<LuaScriptManager>
{
public:
void initialize();
void update(float elapsedTime);
void finalize();
void runScriptString(const char* commandBuffer);
inline LuaContext* getGlobalContext()
{
return getContext("global");
}
LuaContext* getContext(const char* context);
bool freeContext(const char* context);
protected:
typedef std::map<std::string, LuaContext*> ContextMap;
ContextMap mContextMap;
void bindToDebug();
};
} // namespace core
#endif // __LUASCRIPTMANAGER_H__