Changeset 10394 in orxonox.OLD for trunk/src/story_entities
- Timestamp:
- Jan 26, 2007, 9:02:57 PM (18 years ago)
- Location:
- trunk/src/story_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/story_entities/game_world_data.cc
r10379 r10394 102 102 localCamera->setName ("GameWorld-Camera"); 103 103 State::setCamera(localCamera, localCamera->getTarget()); 104 CameraMan* camMan = new CameraMan();105 State::setCameraman(camMan);104 //CameraMan* camMan = new CameraMan(); 105 //State::setCameraman(camMan); 106 106 LightManager::getInstance(); 107 107 … … 132 132 this->loadGUI(root); 133 133 this->loadWorldEntities(root); 134 this->loadCameras(root); 134 135 this->loadScene(root); 135 136 … … 146 147 this->unloadWorldEntities(); 147 148 this->unloadScene(); 148 149 this->unloadCameras(); 150 151 return ErrorMessage(); 152 } 153 154 /** 155 * @brief creates the cameras 156 * @param root reference to the xml root element 157 */ 158 ErrorMessage GameWorldData::loadCameras(const TiXmlElement* root) 159 { 160 const TiXmlElement* element = root->FirstChildElement("CameraMan"); 161 if( element != NULL) 162 { 163 printf("found CameraMan tag \n"); 164 CameraMan* camMan = new CameraMan(element); 165 State::setCameraman(camMan); 166 } 167 return ErrorMessage(); 168 } 169 170 171 /** 172 * @brief unloads the camera 173 */ 174 ErrorMessage GameWorldData::unloadCameras() 175 { 176 CameraMan* camMan = State::getCameraman() ; 177 if(camMan != NULL){ 178 delete camMan; 179 State::setCameraman(NULL); 180 } 149 181 return ErrorMessage(); 150 182 } -
trunk/src/story_entities/game_world_data.h
r10379 r10394 48 48 virtual ErrorMessage loadWorldEntities(const TiXmlElement* root); 49 49 virtual ErrorMessage loadScene(const TiXmlElement* root); 50 virtual ErrorMessage loadCameras(const TiXmlElement* root); 50 51 51 52 virtual ErrorMessage unloadGUI(); 52 53 virtual ErrorMessage unloadWorldEntities(); 53 54 virtual ErrorMessage unloadScene(); 55 virtual ErrorMessage unloadCameras(); 56 54 57 55 58 public:
Note: See TracChangeset
for help on using the changeset viewer.