Last change
on this file since 10767 was
8894,
checked in by patrick, 19 years ago
|
merged the branche single_player_map with the trunk
|
File size:
1020 bytes
|
Line | |
---|
1 | /*! |
---|
2 | * @file script_manager.h |
---|
3 | * manages the scripts |
---|
4 | */ |
---|
5 | |
---|
6 | #ifndef _SCRIPT_MANAGER_H |
---|
7 | #define _SCRIPT_MANAGER_H |
---|
8 | |
---|
9 | #include <list> |
---|
10 | |
---|
11 | #include "base_object.h" |
---|
12 | #include "script.h" |
---|
13 | |
---|
14 | |
---|
15 | class ScriptTrigger; |
---|
16 | class Scriptable; |
---|
17 | |
---|
18 | class ScriptManager : public BaseObject |
---|
19 | { |
---|
20 | public: |
---|
21 | ScriptManager(const TiXmlElement* root = NULL); |
---|
22 | ~ScriptManager(); |
---|
23 | |
---|
24 | /// LOADING |
---|
25 | virtual void loadParams(const TiXmlElement* root); |
---|
26 | |
---|
27 | /// QUERY PROCESS |
---|
28 | Script* getScriptByFile(const std::string& file); |
---|
29 | |
---|
30 | void flush(); //!< Resets the script manager |
---|
31 | |
---|
32 | private: |
---|
33 | void createScripts(const TiXmlElement* scripts); |
---|
34 | void createTriggers(const TiXmlElement* triggers); |
---|
35 | |
---|
36 | bool getTriggers(); |
---|
37 | bool getScripts(); |
---|
38 | |
---|
39 | static ScriptManager* singletonRef; //!< Reference to this class |
---|
40 | |
---|
41 | const std::list<BaseObject*>* triggers; //!< A list of all the triggers in the world |
---|
42 | |
---|
43 | const std::list<BaseObject*>* scripts; //!< A list of all the scripts in the world |
---|
44 | |
---|
45 | |
---|
46 | }; |
---|
47 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.