- Timestamp:
- Jan 30, 2007, 11:10:09 AM (18 years ago)
- Location:
- trunk/src
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/util/track/track.cc
r10454 r10498 142 142 this->mode = newMode; 143 143 } 144 145 /** 146 * Sets the bool if the track runs (false) or not (true) 147 */ 148 void Track::pauseTrack(bool stop) 149 { 150 this->pause = stop; 151 } 152 144 153 145 154 /** … … 250 259 { 251 260 float newDt = dt * ratio; 261 if(this->pause) 262 newDt = 0; 252 263 this->localTime = oldTime += newDt; 253 264 } -
trunk/src/util/track/track.h
r10454 r10498 27 27 void setSpeed(float speed); 28 28 void setMode(int newMode); 29 void pauseTrack(bool stop); 29 30 30 31 //void finalize(); … … 55 56 PNode* trackNode; //!< The node that is slave to the Track. This node will be moved while update the Track, and must NOT move itself. 56 57 int mode; //!< Defines the behaviour of the Track. 58 bool pause; //!< Defines if the track runs (false) or not (true) 57 59 }; 58 60 -
trunk/src/world_entities/cameraman.cc
r10497 r10498 48 48 ->addMethod("setRelCoor", Executor4<CameraMan, lua_State*,const std::string&,float,float,float>(&CameraMan::setRelCameraCoor)) 49 49 ->addMethod("setRelCoorSoft", Executor5<CameraMan, lua_State*,const std::string&,float,float,float,float>(&CameraMan::setRelCameraCoorSoft)) 50 ->addMethod("pauseCamera", Executor2<CameraMan, lua_State*, const std::string&, bool>(&CameraMan::pauseCamera)) 50 51 ); 51 52 … … 134 135 dynamic_cast<Camera*>(newCam)->setRelCoorSoft(x,y,z,bias); 135 136 dynamic_cast<Camera*>(newCam)->target->setRelCoorSoft(0,0,0,bias); 137 } 138 139 void CameraMan::pauseCamera(const std::string& camName, bool stop) 140 { 141 BaseObject* newCam = ObjectListBase::getBaseObject("Camera", camName); 142 dynamic_cast<Camera*>(newCam)->pauseTrack(stop); 136 143 } 137 144 -
trunk/src/world_entities/cameraman.h
r10497 r10498 58 58 void setRelCameraCoorSoft(const std::string& cameraName, float x, float y, float z, float bias); 59 59 //void setViewMode(const std::string& camName, const std::string& viewMode); 60 void pauseCamera(const std::string& camName, bool stop); 60 61 61 62 void changeSpeed(float speed); -
trunk/src/world_entities/npcs/npc.cc
r10459 r10498 52 52 ->addMethod("setAbsDir", Executor4<PNode, lua_State*,float,float,float,float>(&PNode::setAbsDir)) 53 53 ->addMethod("fire", Executor0<NPC, lua_State*>(&NPC::fire)) 54 54 ->addMethod("pause", Executor1<WorldEntity, lua_State*, bool>(&WorldEntity::pauseTrack)) 55 55 ); 56 56 -
trunk/src/world_entities/space_ships/space_ship.cc
r10497 r10498 91 91 ->addMethod("getAbsCoorZ", Executor0ret<PNode, lua_State*, float>(&PNode::getAbsCoorZ)) 92 92 //->addMethod("setCameraSpeed", Executor1<SpaceShip, lua_State*, float>(&SpaceShip::setCameraSpeed)) 93 ->addMethod("pause", Executor1<WorldEntity, lua_State*, bool>(&WorldEntity::pauseTrack)) 93 94 ); 94 95 -
trunk/src/world_entities/world_entity.cc
r10449 r10498 198 198 } 199 199 200 void WorldEntity::pauseTrack(bool stop) 201 { 202 if(this->entityTrack) 203 this->entityTrack->pauseTrack(stop); 204 } 205 200 206 201 207 /** -
trunk/src/world_entities/world_entity.h
r10449 r10498 176 176 ; ///FIXME 177 177 void debugEntity() const; 178 179 void pauseTrack(bool stop); 178 180 179 181 … … 192 194 void updateHealthWidget(); 193 195 void addTrack(const TiXmlElement* root); 196 194 197 195 198
Note: See TracChangeset
for help on using the changeset viewer.