- Timestamp:
- Jul 21, 2012, 3:51:06 PM (12 years ago)
- Location:
- code/branches/presentation2012merge/src/orxonox/interfaces
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2012merge/src/orxonox/interfaces/Pickupable.cc
r9318 r9320 322 322 /** 323 323 @brief 324 Creates a duplicate of the Pickupable.325 @return326 Returns the clone of this pickup as a pointer to a Pickupable.327 */328 Pickupable* Pickupable::clone(void)329 {330 OrxonoxClass* item = NULL;331 this->clone(item);332 333 Pickupable* pickup = orxonox_cast<Pickupable*>(item);334 335 orxout(verbose, context::pickups) << "Pickupable (&" << this << ") cloned. Clone is new Pickupable (&" << pickup << ")." << endl;336 return pickup;337 }338 339 /**340 @brief341 324 Method to transcribe a Pickupable as a Rewardable to the player. 342 325 @param player -
code/branches/presentation2012merge/src/orxonox/interfaces/Pickupable.h
r9319 r9320 137 137 bool addTarget(Identifier* identifier); //!< Add a class, representetd by the input Identifier, as target of this Pickupable. 138 138 139 Pickupable* clone(void); //!< Creates a duplicate of the Pickupable.140 /**141 @brief Creates a duplicate of the input OrxonoxClass.142 This method needs to be implemented by any Class inheriting from Pickupable.143 @param item A reference to a pointer to the OrxonoxClass that is to be duplicated.144 */145 virtual void clone(OrxonoxClass*& item) {}146 147 139 bool setUsed(bool used); //!< Sets the Pickupable to used or unused, depending on the input. 148 140 bool setPickedUp(bool pickedUp); //!< Helper method to set the Pickupable to either picked up or not picked up. … … 196 188 //! SUPER functions. 197 189 SUPER_FUNCTION(10, Pickupable, changedUsed, false); 198 SUPER_FUNCTION(12, Pickupable, changedCarrier, false); 199 SUPER_FUNCTION(13, Pickupable, changedPickedUp, false); 200 SUPER_FUNCTION(11, Pickupable, clone, false); 190 SUPER_FUNCTION(11, Pickupable, changedCarrier, false); 191 SUPER_FUNCTION(12, Pickupable, changedPickedUp, false); 201 192 } 202 193
Note: See TracChangeset
for help on using the changeset viewer.