Last change
on this file since 8193 was
8193,
checked in by snellen, 18 years ago
|
script_engine: swapping to integrate into the ORXONOX framework
|
File size:
1014 bytes
|
Line | |
---|
1 | #ifndef _SCRIPT_MANAGER_H |
---|
2 | #define _SCRIPT_MANAGER_H |
---|
3 | |
---|
4 | #include <list> |
---|
5 | #include <string> |
---|
6 | |
---|
7 | #include "script.h" |
---|
8 | #include "base_object.h" |
---|
9 | #include "luaincl.h" |
---|
10 | #include "loading/load_param.h" |
---|
11 | |
---|
12 | |
---|
13 | class ScriptTrigger; |
---|
14 | class Scriptable; |
---|
15 | |
---|
16 | class ScriptManager : public BaseObject |
---|
17 | { |
---|
18 | public: |
---|
19 | ScriptManager(); |
---|
20 | ~ScriptManager(); |
---|
21 | |
---|
22 | inline static ScriptManager* getInstance() { if (!ScriptManager::singletonRef)ScriptManager::singletonRef = new ScriptManager(); return ScriptManager::singletonRef; } |
---|
23 | |
---|
24 | virtual void loadParams(const TiXmlElement* root); |
---|
25 | |
---|
26 | void tick(float timestep); |
---|
27 | |
---|
28 | Script* getScriptByFile(std::string& file); |
---|
29 | |
---|
30 | |
---|
31 | |
---|
32 | private: |
---|
33 | |
---|
34 | void init(); |
---|
35 | void createScriptList(const TiXmlElement* scripts); |
---|
36 | void addObjectToScript(const std::string object); |
---|
37 | |
---|
38 | |
---|
39 | static ScriptManager* singletonRef; //!< Reference to this class |
---|
40 | |
---|
41 | const std::list<BaseObject*>* triggerList; |
---|
42 | |
---|
43 | const std::list<BaseObject*>* scriptableClasses; |
---|
44 | const std::list<BaseObject*>* scripts; |
---|
45 | |
---|
46 | |
---|
47 | }; |
---|
48 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.