Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10585 in orxonox.OLD for branches/cleanup/src/world_entities


Ignore:
Timestamp:
Feb 8, 2007, 6:14:35 PM (18 years ago)
Author:
snellen
Message:

Removed classes Account and Object (both needed only to test the scriptingframework)and removed example.cc, cleaned commented code in script_trigger.cc and gameworld.cc. … more to come

Location:
branches/cleanup/src/world_entities
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/cleanup/src/world_entities/script_trigger.cc

    r10381 r10585  
    244244  }
    245245}
    246 
    247 /*
    248  void ScriptTrigger::testScriptingFramework()
    249 {
    250    std::string file("lunartest2.lua");
    251    //get script
    252    Script* script = State::getScriptManager()->getScriptByFile(file);
    253    printf("-------------------------- top of the stack:%i\n",lua_gettop(script->getLuaState()));
    254 
    255       //execute a function
    256    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    else
    271      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 function
    279    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  
    3030    virtual void tick(float timestep);
    3131    virtual void executeAction(float timestep);
    32     void testScriptingFramework();
    3332
    3433    /// SET MEMBER
Note: See TracChangeset for help on using the changeset viewer.