Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6845 in orxonox.OLD for trunk/src/story_entities/simple_game_menu.cc


Ignore:
Timestamp:
Jan 30, 2006, 2:01:00 AM (18 years ago)
Author:
bensch
Message:

trunk: Element2D's should be loadable over the <Elements> </Elements> tab

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/story_entities/simple_game_menu.cc

    r6843 r6845  
    122122{
    123123  GameWorld::loadData();
     124
     125  if (this->dataXML != NULL)
     126  {
     127    TiXmlElement* element = this->dataXML->FirstChildElement("Elements");
     128
     129    if( element == NULL)
     130    {
     131      PRINTF(1)("SimpleGameMenu is missing 'Elements'\n");
     132    }
     133    else
     134    {
     135      element = element->FirstChildElement();
     136    // load Players/Objects/Whatever
     137      PRINTF(4)("Loading Elements\n");
     138      while( element != NULL)
     139      {
     140        BaseObject* created = Factory::fabricate(element);
     141        if( created != NULL )
     142          PRINTF(4)("Created a %s: %s\n", created->getClassName(), created->getName());
     143
     144      }
     145      PRINTF(4)("Done loading Elements\n");
     146    }
     147  }
    124148
    125149  /* get the menu list */
Note: See TracChangeset for help on using the changeset viewer.