Changeset 9692 in orxonox.OLD for branches/new_class_id/src/lib/script_engine/script.cc
- Timestamp:
- Aug 23, 2006, 12:43:25 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/lib/script_engine/script.cc
r9298 r9692 24 24 25 25 #include "class_list.h" 26 CREATE_SCRIPTABLE_CLASS(Script, CL_SCRIPT,26 CREATE_SCRIPTABLE_CLASS(Script, Script::classID(), 27 27 addMethod("addObject", ExecutorLua2<Script,const std::string&, const std::string& >(&Script::addObject)) 28 28 ->addMethod("registerClass", ExecutorLua1<Script,const std::string&>(&Script::registerClass)) … … 31 31 ); 32 32 33 NewObjectListDefinition(Script); 34 33 35 Script::Script(const TiXmlElement* root) 34 36 { 35 this-> setClassID(CL_SCRIPT, "Script");37 this->registerObject(this, Script::_objectList); 36 38 37 39 returnCount = argumentCount = 0; … … 64 66 luaopen_math(luaState); 65 67 luaopen_debug(luaState); 66 68 67 69 this->loadFile(filename); 68 70 … … 100 102 std::string filedest(ResourceManager::getInstance()->getDataDir()); 101 103 filedest += "scripts/" + filename; 102 104 103 105 this->addThisScript(); 104 106 this->registerStandartClasses(); 105 107 106 108 if(currentFile.length() != 0) 107 109 { … … 295 297 lua_remove(luaState,-1*returnCount); 296 298 returnCount--; 297 299 298 300 } 299 301 } … … 375 377 { 376 378 bool success = false; 377 379 378 380 //this->registerClass(std::string("Vector")); 379 381 this->registerClass("ScriptTrigger"); … … 382 384 return success; 383 385 } 384 385 386 387 386 388 void Script::registerClass( const std::string& className) 387 389 { … … 400 402 } 401 403 } 402 404 403 405 } 404 406
Note: See TracChangeset
for help on using the changeset viewer.