Changeset 8155 in orxonox.OLD for branches/script_engine/src/lib/script_engine/script_manager.h
- Timestamp:
- Jun 5, 2006, 3:47:10 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/script_engine/src/lib/script_engine/script_manager.h
r8139 r8155 11 11 12 12 13 //!< Contains the name s of all objects in a world and a list of all script files that need the object.14 struct worldObject13 //!< Contains the name of a lua script file and a list of all objects that the script needs 14 struct LuaScript 15 15 { 16 16 std::string name; 17 std::list<std::string> scriptFiles; 17 std::list<std::string> objectList; 18 Script script; 18 19 }; 19 20 … … 22 23 public: 23 24 ScriptManager(); 24 ScriptManager(std::string& world);25 25 ~ScriptManager(); 26 26 27 27 inline static ScriptManager* getInstance(); 28 28 29 void loadParams(const TiXmlElement* root); 29 virtual void loadParams(const TiXmlElement* root); 30 void setWorld(std::string& world){currentWorld = world;} 30 31 31 32 void tick(float timestep); 32 33 void changeWorld(std::string& newWorld);34 35 33 36 34 void initScripts(); // initializes all scripts … … 38 36 private: 39 37 40 void init(std::string& world); 38 void init(); 39 void createScriptList(TiXmlElement* scripts); 40 void setCurrentScriptFile(std::string& file); 41 void addObjectToScript(std::string& object, LuaScript& script); 41 42 42 static ScriptManager* singletonRef; //!< Reference to this class 43 std::list<worldObject> objectList; //!< The list of all Objects in a world (read from the *.oxw file of the world) 44 std::string currentWorld; 43 bool fileIsInScriptList(std::string& file); 44 bool objectIsInObjectList(std::string& object,const LuaScript& script); 45 46 47 static ScriptManager* singletonRef; //!< Reference to this class 48 std::list<LuaScript> scriptList; //!< The list of all scripts that the current world needs 49 std::string currentWorld; 50 LuaScript currentScript; //!< For temorary use 51 45 52 46 53
Note: See TracChangeset
for help on using the changeset viewer.