Changeset 4239 in orxonox.OLD for orxonox/branches/levelLoader/src/world_entities
- Timestamp:
- May 20, 2005, 2:44:10 AM (19 years ago)
- Location:
- orxonox/branches/levelLoader/src/world_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/levelLoader/src/world_entities/world_entity.cc
r4233 r4239 23 23 #include "vector.h" 24 24 25 #include "load_param.h"26 27 25 using namespace std; 28 26 … … 43 41 WorldEntity::WorldEntity(TiXmlElement* root) 44 42 { 43 this->setClassName ("WorldEntity"); 45 44 // Name Setup 46 char* temp; 47 const char* string; 48 string = grabParameter( root, "name"); 49 if( string == NULL) 50 { 51 PRINTF(2)("WorldEntity is missing a proper 'name'\n"); 52 this->setName("unknown"); 53 } 54 else 55 { 56 LoadParam<WorldEntity> (string, this, &WorldEntity::setName); 57 } 45 LoadParam<WorldEntity>(root, "name", this, &WorldEntity::setName); 58 46 // Model Loading 59 47 this->model = NULL; 60 string = grabParameter( root, "model"); 61 if( string != NULL) 62 LoadParam<WorldEntity>(string, this, &WorldEntity::loadModel); 63 else 64 { 65 PRINTF(2)("WorldEntity is missing a proper 'model'\n"); 66 this->model = NULL; 67 } 68 if( this->model == NULL) 69 { 70 PRINTF(2)("WorldEntity model '%s' could not be loaded\n", string); 71 } 48 LoadParam<WorldEntity>(root, "model", this, &WorldEntity::loadModel); 49 72 50 this->bDraw = true; 73 51 } -
orxonox/branches/levelLoader/src/world_entities/world_entity.h
r4233 r4239 10 10 #include "comincl.h" 11 11 #include "resource_manager.h" 12 #include "factory.h" 13 #include "load_param.h" 12 14 13 15 … … 15 17 class CharacterAttributes; 16 18 class Model; 17 18 19 19 //! Basic class from which all interactive stuff in the world is derived from 20 20 class WorldEntity : public PNode
Note: See TracChangeset
for help on using the changeset viewer.