Changeset 10585 in orxonox.OLD for branches/cleanup/src/world_entities
- Timestamp:
- Feb 8, 2007, 6:14:35 PM (18 years ago)
- Location:
- branches/cleanup/src/world_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/cleanup/src/world_entities/script_trigger.cc
r10381 r10585 244 244 } 245 245 } 246 247 /*248 void ScriptTrigger::testScriptingFramework()249 {250 std::string file("lunartest2.lua");251 //get script252 Script* script = State::getScriptManager()->getScriptByFile(file);253 printf("-------------------------- top of the stack:%i\n",lua_gettop(script->getLuaState()));254 255 //execute a function256 printf("----------- main -----------\n");257 std::string main("main");258 if( script->selectFunction(main,3))259 printf("function %s selected\n",main.c_str());260 261 script->pushParam(3.14159,main);262 printf("-------------------------- top of the stack:%i\n",lua_gettop(script->getLuaState()));263 script->executeFunction();264 265 int ret = script->getReturnedInt();266 printf("main returned %i\n",ret);267 268 if(script->getReturnedBool())269 printf("main returned true\n");270 else271 printf("main returned false\n");272 273 float retf = script->getReturnedFloat();274 printf("main returned %f\n",retf);275 276 277 printf("-------------------------- top of the stack:%i\n",lua_gettop(script->getLuaState()));278 //execute a 2nd function279 printf("----------- test -----------\n");280 std::string test("test");281 if( script->selectFunction(test,0))282 printf("function %s selected\n",test.c_str());283 284 script->executeFunction();285 286 287 //if(argc>1) lua_dofile(script.getLuaState(), argv[1]);288 printf("-------------------------- top of the stack:%i\n",lua_gettop(script->getLuaState()));289 290 }*/ -
branches/cleanup/src/world_entities/script_trigger.h
r9869 r10585 30 30 virtual void tick(float timestep); 31 31 virtual void executeAction(float timestep); 32 void testScriptingFramework();33 32 34 33 /// SET MEMBER
Note: See TracChangeset
for help on using the changeset viewer.