Changeset 8212 in orxonox.OLD for branches/script_engine/src
- Timestamp:
- Jun 7, 2006, 8:51:05 PM (18 years ago)
- Location:
- branches/script_engine/src/lib/script_engine
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/script_engine/src/lib/script_engine/script_manager.cc
r8211 r8212 95 95 96 96 97 Script* ScriptManager::getScriptByFile( std::string& file)97 Script* ScriptManager::getScriptByFile(const std::string& file) 98 98 { 99 99 if(getScripts()) -
branches/script_engine/src/lib/script_engine/script_manager.h
r8208 r8212 21 21 /// LOADING 22 22 virtual void loadParams(const TiXmlElement* root); 23 23 24 24 /// QUERRYING 25 Script* getScriptByFile(std::string& file); 26 25 Script* getScriptByFile(const std::string& file); 27 26 28 27 28 29 29 private: 30 30 … … 33 33 void createScripts(const TiXmlElement* scripts); 34 34 void createTriggers(const TiXmlElement* triggers); 35 35 36 36 bool getTriggers(); 37 37 bool getScripts(); -
branches/script_engine/src/lib/script_engine/script_trigger.cc
r8211 r8212 22 22 if(root != NULL) 23 23 { 24 WorldEntity ::loadParams(root);24 WorldEntity ::loadParams(root); 25 25 26 {LoadParam(root, "file", this, ScriptTrigger, setScript)26 LoadParam(root, "file", this, ScriptTrigger, setScript) 27 27 .describe("the fileName of the script, that should be triggered by this script trigger") 28 28 .defaultValues(""); … … 46 46 .defaultValues(""); 47 47 48 } 49 timer = delay; 48 50 49 } 51 50 … … 107 106 { 108 107 if(!(script->selectFunction(this->functionName,0)) ) 109 printf("Error ScriptTrigger: Selection of %s in %s failed.\n",functionName.c_str(), script File.c_str());108 printf("Error ScriptTrigger: Selection of %s in %s failed.\n",functionName.c_str(), script->getFileName().c_str()); 110 109 if( !(script->executeFunction()) ) 111 printf("Error ScriptTrigger: Execution of %s in %s failed.\n",functionName.c_str(), scriptFile.c_str());110 printf("Error ScriptTrigger: Execution of %s in %s failed.\n",functionName.c_str(), script->getFileName().c_str()); 112 111 } 113 112 }
Note: See TracChangeset
for help on using the changeset viewer.