- Timestamp:
- Jan 29, 2007, 2:48:59 PM (18 years ago)
- Location:
- trunk/src/world_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/cameraman.cc
r10481 r10482 150 150 } 151 151 152 void CameraMan::atachCurrTarget(PNode* target)153 {154 currentCam->target->atach(target);155 currentCam->setViewMode(Camera::ViewNormal);156 State::setCamera(this->currentCam, dynamic_cast<CameraTarget*>(target));157 158 }159 152 160 153 void CameraMan::atachCurrCameraToWorldEntity(const std::string& className, const std::string& targetEntity) … … 164 157 if(object != NULL && object->isA(PNode::staticClassID())) 165 158 { 166 this->atach CurrTarget(dynamic_cast<PNode*>(object));159 this->atachTarget(this->currentCam, dynamic_cast<PNode*>(object)); 167 160 return; 168 161 } … … 233 226 if( object != NULL && targetCam != NULL && object->isA(PNode::staticClassID()) ) 234 227 { 235 dynamic_cast<Camera*>(targetCam)->target->atach(dynamic_cast<PNode*>(object)); 236 dynamic_cast<Camera*>(targetCam)->setViewMode(Camera::ViewNormal); 237 State::setCamera(dynamic_cast<Camera*>(targetCam), dynamic_cast<CameraTarget*>(object)); 228 this->atachTarget(dynamic_cast<Camera*>(targetCam), dynamic_cast<PNode*>( object )); 238 229 return; 239 230 } … … 304 295 305 296 297 void CameraMan::atachTarget(Camera* cam ,PNode* target) 298 { 299 cam->target->atach(target); 300 cam->setViewMode(Camera::ViewNormal); 301 State::setCamera( cam, dynamic_cast<CameraTarget*>(target)); 302 303 } 304 306 305 //how to get a class fkt pointer 307 306 -
trunk/src/world_entities/cameraman.h
r10480 r10482 42 42 void moveCurrCam(int x, int y, int z); 43 43 void changeCurrTarget(const std::string& className, const std::string& objectName); 44 void atachCurrTarget(PNode* target);45 44 void atachCurrCameraToWorldEntity(const std::string& className, const std::string& targetEntity); 46 45 void detachCurrCamera(); … … 62 61 private: 63 62 bool cameraIsInVector(Camera* camera); 63 void atachTarget(Camera* cam, PNode* pnode); 64 64 65 65
Note: See TracChangeset
for help on using the changeset viewer.