Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 6, 2006, 9:18:31 AM (18 years ago)
Author:
snellen
Message:

scripttrigger implemented. todo: make loadParam work

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/script_engine/src/lib/script_engine/script_manager.cc

    r8170 r8171  
    1818}
    1919
    20 ScriptManager* ScriptManager::getInstance()
    21 {
    22 
    23   if (!ScriptManager::singletonRef)
    24     ScriptManager::singletonRef = new ScriptManager();
    25   return ScriptManager::singletonRef;
    26 
    27 }
    2820
    2921void ScriptManager::loadParams(const TiXmlElement* root)
     
    8476    LOAD_PARAM_START_CYCLE(script, object);
    8577    {
    86       LoadParam_CYCLE(object, "object", this, ScriptManager, addObjectToScript)
    87           .describe("The name of an object that is needed by a script");
     78     // LoadParam_CYCLE(object, "object", this, ScriptManager, addObjectToScript)
     79       //   .describe("The name of an object that is needed by a script");
    8880    }
    8981    LOAD_PARAM_END_CYCLE(object);
     
    9688  }
    9789
     90
     91}
     92
     93
     94Script* ScriptManager::getScriptByFile(std::string& file)
     95{
     96
     97  for(std::list<LuaScript>::iterator it = scriptList.begin(); it != scriptList.end(); it++ )
     98  {
     99    if( (*it).name.compare(file) == 0)
     100    {
     101      return &((*it).script);
     102    }
     103  }
     104  return NULL;
    98105
    99106}
Note: See TracChangeset for help on using the changeset viewer.