Changeset 5831 for code/branches/core5/src/orxonox/pickup
- Timestamp:
- Sep 28, 2009, 10:48:47 PM (15 years ago)
- Location:
- code/branches/core5/src/orxonox/pickup
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core5/src/orxonox/pickup/DroppedItem.cc
r5801 r5831 76 76 if (this->timeToLive_ > 0) 77 77 { 78 ExecutorMember<DroppedItem>* exec = createExecutor(createFunctor(&DroppedItem::timerCallback)); 79 this->timer_.setTimer(this->timeToLive_, false, this, exec, false); 78 this->timer_.setTimer(this->timeToLive_, false, createExecutor(createFunctor(&DroppedItem::timerCallback, this)), false); 80 79 } 81 80 } -
code/branches/core5/src/orxonox/pickup/DroppedItem.h
r5738 r5831 77 77 BaseItem* item_; 78 78 79 Timer <DroppedItem>timer_;79 Timer timer_; 80 80 }; 81 81 } -
code/branches/core5/src/orxonox/pickup/ModifierPickup.cc
r5801 r5831 101 101 if (this->duration_ > 0.0f) 102 102 { 103 Executor Member<ModifierPickup>* executor = createExecutor(createFunctor(&ModifierPickup::timerCallback));103 Executor* executor = createExecutor(createFunctor(&ModifierPickup::timerCallback, this)); 104 104 executor->setDefaultValues(pawn); 105 this->timer_.setTimer(this->duration_, false, this,executor);105 this->timer_.setTimer(this->duration_, false, executor); 106 106 } 107 107 -
code/branches/core5/src/orxonox/pickup/ModifierPickup.h
r5738 r5831 129 129 130 130 void timerCallback(Pawn* pawn); //!< Method called when the timer runs out. 131 131 132 private: 132 133 float getAdditiveModifier(ModifierType::Value type) const; //!< Get the additive modifier for a given ModifierType. … … 138 139 std::map<ModifierType::Value, float> multiplicativeModifiers_; //!< Map of multiplicative modifiers, indexed by ModifierType. 139 140 140 float duration_; //!< Duration of this pickup's effect (0 for unlimited).141 Timer <ModifierPickup> timer_;//!< Timer used if the pickup's effect has a time limit.141 float duration_; //!< Duration of this pickup's effect (0 for unlimited). 142 Timer timer_; //!< Timer used if the pickup's effect has a time limit. 142 143 }; 143 144 } -
code/branches/core5/src/orxonox/pickup/PickupSpawner.cc
r5801 r5831 166 166 if (this->respawnTime_ > 0.0f) 167 167 { 168 ExecutorMember<PickupSpawner>* executor = createExecutor(createFunctor(&PickupSpawner::respawnTimerCallback)); 169 this->respawnTimer_.setTimer(this->respawnTime_, false, this, executor); 168 this->respawnTimer_.setTimer(this->respawnTime_, false, createExecutor(createFunctor(&PickupSpawner::respawnTimerCallback, this))); 170 169 171 170 this->setActive(false); -
code/branches/core5/src/orxonox/pickup/PickupSpawner.h
r5738 r5831 114 114 115 115 float respawnTime_; //!< Time after which this gets re-actived. 116 Timer <PickupSpawner> respawnTimer_;//!< Timer used for re-activating.116 Timer respawnTimer_; //!< Timer used for re-activating. 117 117 }; 118 118 }
Note: See TracChangeset
for help on using the changeset viewer.