source:
orxonox.OLD/branches/script_engine/src/lib/script_engine/script_manager.h
@
8135
Last change on this file since 8135 was 8135, checked in by snellen, 18 years ago | |
---|---|
File size: 890 bytes |
Rev | Line | |
---|---|---|
[8085] | 1 | #ifndef _SCRIPT_MANAGER_H |
2 | #define _SCRIPT_MNAGER_H | |
3 | ||
[8131] | 4 | #include <list> |
[8085] | 5 | #include <string> |
[8093] | 6 | |
[8131] | 7 | #include "script.h" |
[8085] | 8 | #include "base_object.h" |
9 | #include "luaincl.h" | |
[8093] | 10 | #include "loading/load_param.h" |
[8085] | 11 | |
12 | ||
[8131] | 13 | //!< Contains the names of all objects in a world and a list of all script files that need the object. |
14 | struct worldObject | |
15 | { | |
16 | std::string name; | |
17 | std::list<std::string> scriptFiles; | |
18 | }; | |
[8085] | 19 | |
[8093] | 20 | class ScriptManager //: public BaseObject |
[8085] | 21 | { |
22 | public: | |
[8135] | 23 | ScriptManager(std::string& world); |
[8093] | 24 | virtual ~ScriptManager(); |
[8085] | 25 | |
[8093] | 26 | virtual void loadParams(const TiXmlElement* root); |
[8085] | 27 | |
[8131] | 28 | virtual void tick(float timestep); |
[8085] | 29 | |
[8135] | 30 | void changeWorld(std::string& newWorld); |
[8131] | 31 | |
32 | ||
33 | void initScripts(); // initializes all scripts | |
34 | ||
[8085] | 35 | private: |
[8135] | 36 | void init(std::string& world); |
[8085] | 37 | |
[8131] | 38 | std::list<scriptableObject> objectList; //!< The list of all Objects in a world (read from the *.oxw file of the world) |
39 | std::string currentWorld; | |
[8085] | 40 | |
[8131] | 41 | |
[8085] | 42 | }; |
43 | #endif |
Note: See TracBrowser
for help on using the repository browser.