Changeset 10622 in orxonox.OLD for trunk/src/lib/script_engine
- Timestamp:
- Apr 6, 2007, 6:54:15 PM (18 years ago)
- Location:
- trunk/src/lib/script_engine
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/script_engine/script.cc
r10381 r10622 106 106 filedest += "scripts/" + directory + file; 107 107 108 this->add ThisScript();108 this->addStandartObjects(); 109 109 this->registerStandartClasses(); 110 110 … … 406 406 bool success = false; 407 407 408 //this->registerClass(std::string("Vector")); 409 this->registerClass("ScriptTrigger"); 410 // this->registerClass("AttractorMine"); 408 this->registerClass("SpaceTrigger"); 409 this->registerClass("TickTrigger"); 410 this->registerClass("TimeTrigger"); 411 412 return success; 413 } 414 415 bool Script::addStandartObjects() 416 { 417 bool success = true; 418 419 this->addThisScript(); 411 420 412 421 return success; -
trunk/src/lib/script_engine/script.h
r10381 r10622 68 68 int reportError(int error); //!< Get errormessage from the lua stack and print it. 69 69 bool registerStandartClasses(); //!< Register all the classes that the script might need 70 bool addStandartObjects(); //!< Add all the objects that the script might need 70 71 bool classIsRegistered(const std::string& type); //!< Checks wheter the class "type" has already been registered with the script 71 72 bool objectIsAdded(const std::string& name); //!< Checks wheter the object "name" has already been added to the script -
trunk/src/lib/script_engine/script_manager.cc
r10618 r10622 25 25 26 26 #include "script.h" 27 #include " tools/script_trigger.h"27 #include "script_triggers/script_trigger.h" 28 28 #include "luaincl.h" 29 29 #include "loading/load_param_xml.h" 30 #include "util/loading/factory.h" 30 31 31 32 … … 50 51 { 51 52 BaseObject::loadParams(root); 52 {53 LoadParamXML(root, "Scripts", this, ScriptManager, createScripts);54 53 55 LoadParamXML(root, "ScriptTriggers", this, ScriptManager, createTriggers); 56 } // make shure that the loading process is finished 54 LoadParamXML(root, "Scripts", this, ScriptManager, createScripts); 57 55 58 // fill the scripts and triggers (doing that on runtime is very slow!) 56 LoadParamXML(root, "ScriptTriggers", this, ScriptManager, createTriggers); 57 59 58 } 60 59 … … 85 84 void ScriptManager::createTriggers(const TiXmlElement* triggers) 86 85 { 86 87 87 LOAD_PARAM_START_CYCLE(triggers, object); 88 88 { 89 new ScriptTrigger(object);89 Factory::fabricate(object); 90 90 } 91 91 LOAD_PARAM_END_CYCLE(object);
Note: See TracChangeset
for help on using the changeset viewer.