Changeset 6521 for code/branches/pickup3/src/modules
- Timestamp:
- Mar 15, 2010, 7:33:11 AM (15 years ago)
- Location:
- code/branches/pickup3/src/modules/pickup
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pickup3/src/modules/pickup/Pickup.cc
r6515 r6521 182 182 @brief 183 183 Should be called when the pickup has transited from picked up to dropped or the other way around. 184 Any Class overwriting this method must call its SUPER function by adding SUPER(Classname, changed Carrier); to their changedCarriermethod.185 */ 186 void Pickup::changed Carrier(void)187 { 188 SUPER(Pickup, changed Carrier);184 Any Class overwriting this method must call its SUPER function by adding SUPER(Classname, changedPickedUp); to their changedPickedUp method. 185 */ 186 void Pickup::changedPickedUp(void) 187 { 188 SUPER(Pickup, changedPickedUp); 189 189 190 190 //! Sets the Pickup to used if the Pickup has activation type 'immediate' and gets picked up. -
code/branches/pickup3/src/modules/pickup/Pickup.h
r6497 r6521 117 117 { return this->getDurationTypeDirect() == pickupDurationType::continuous; } 118 118 119 virtual void changed Carrier(void); //!< Should be called when the pickup has transited from picked up to dropped or the other way around.119 virtual void changedPickedUp(void); //!< Should be called when the pickup has transited from picked up to dropped or the other way around. 120 120 121 121 virtual void clone(OrxonoxClass*& item); //!< Creates a duplicate of the Pickup. -
code/branches/pickup3/src/modules/pickup/PickupCollection.cc
r6519 r6521 138 138 } 139 139 140 //TODO: Steal description from Pickupable.141 140 void PickupCollection::changedUsed(void) 142 141 { … … 150 149 } 151 150 152 void PickupCollection::changedCarrier( )151 void PickupCollection::changedCarrier(void) 153 152 { 154 153 SUPER(PickupCollection, changedCarrier); 155 154 155 //! Change used for all Pickupables this PickupCollection consists of. 156 for(std::vector<Pickupable*>::iterator it = this->pickups_.begin(); it != this->pickups_.end(); it++) 157 { 158 (*it)->setCarrier(this->getCarrier()); 159 } 160 } 161 162 void PickupCollection::changedPickedUp() 163 { 164 SUPER(PickupCollection, changedPickedUp); 165 156 166 //! Change the carrier for all Pickupables this PickupCollection consists of. 157 167 for(std::vector<Pickupable*>::iterator it = this->pickups_.begin(); it != this->pickups_.end(); it++) 158 168 { 159 (*it)->setCarrier(this->getCarrier()); 160 } 161 } 162 163 //TODO: Steal description from Pickupable. 169 (*it)->setPickedUp(this->isPickedUp()); 170 } 171 } 172 164 173 void PickupCollection::clone(OrxonoxClass*& item) 165 174 { -
code/branches/pickup3/src/modules/pickup/PickupCollection.h
r6519 r6521 58 58 59 59 virtual void changedUsed(void); 60 61 60 virtual void changedCarrier(void); 61 virtual void changedPickedUp(void); 62 62 63 63 virtual void clone(OrxonoxClass*& item);
Note: See TracChangeset
for help on using the changeset viewer.