Changeset 6705 for code/branches/ppspickups1/src
- Timestamp:
- Apr 13, 2010, 12:09:10 AM (15 years ago)
- Location:
- code/branches/ppspickups1/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/ppspickups1/src/modules/pickup/Pickup.cc
r6643 r6705 236 236 /** 237 237 @brief 238 Starts the Pickup duration Timer. 238 Starts the pickup duration timer. 239 After the specified durationTime has expired the function pickupTimerCallback is called. 240 pickupTimerCallback can be overloaded and thus the desired functionality can be implemented. 241 @param durationTime 242 The duration after which the expires and the callback function is called. 243 @return 244 Returns true if the pickup duration timer was started successfully, false if not. 239 245 */ 240 246 bool Pickup::startPickupTimer(float durationTime) … … 245 251 return false; 246 252 } 247 if ( false) /* TODO: Check if Timer is already running */253 if (this->durationTimer_.isActive()) //!< Check if Timer is already running 248 254 { 249 255 COUT(1) << "Pickup durationTimer already in use." << std::endl; 250 256 return false; 251 257 } 252 this->durationTimer_.setTimer(durationTime, false, createExecutor(createFunctor(&Pickup:: PickupTimerCallBack, this)));258 this->durationTimer_.setTimer(durationTime, false, createExecutor(createFunctor(&Pickup::pickupTimerCallback, this))); 253 259 return true; 254 260 } -
code/branches/ppspickups1/src/modules/pickup/Pickup.h
r6607 r6705 137 137 bool startPickupTimer(float durationTime); 138 138 139 virtual void PickupTimerCallBack(void) {}139 virtual void pickupTimerCallback(void) {} 140 140 141 141 /** … … 157 157 private: 158 158 void initialize(void); //!< Initializes the member variables. 159 160 //TODO: Problems, when there are more Timers needed? Solutions? 161 Timer durationTimer_; //!< Timer at the disposal of each Class implementing Pickup. 159 162 160 163 pickupActivationType::Value activationType_; //!< The activation type of the Pickup. … … 165 168 static const std::string durationTypeOnce_s; 166 169 static const std::string durationTypeContinuous_s; 167 168 float durationTime_;169 Timer durationTimer_;170 170 }; 171 171 -
code/branches/ppspickups1/src/modules/pickup/items/SpeedPickup.h
r6681 r6705 94 94 } 95 95 96 #endif // _ HealthPickup_H__96 #endif // _SpeedPickup_H__ -
code/branches/ppspickups1/src/orxonox/items/Engine.h
r6643 r6705 115 115 virtual const Vector3& getCarrierPosition(void); 116 116 117 / * Should not be here */117 //TODO: Move to protected or private. How? 118 118 inline void setSpeedAdd(float speedAdd) 119 119 { this->speedAdd_=speedAdd; } -
code/branches/ppspickups1/src/orxonox/worldentities/pawns/SpaceShip.cc
r6607 r6705 224 224 { 225 225 std::list<PickupCarrier*>* list = new std::list<PickupCarrier*>(); 226 list->push_front( engine_);226 list->push_front(this->engine_); 227 227 return list; 228 228 }
Note: See TracChangeset
for help on using the changeset viewer.