- Timestamp:
- Jul 18, 2012, 10:36:24 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2012merge/src/modules/pickup/PickupCollection.h
r9295 r9318 50 50 The PickupCollection combines different @ref orxonox::Pickupable "Pickupables" (more precisely @ref orxonox::CollectiblePickup "CollectiblePickups") to a coherent, single pickup and makes them seem (from the outside looking in) just as if they were just one @ref orxonox::Pickupable "Pickupable". 51 51 52 To differentiate between different types of @ref orxonox::PickupCollection "PickupCollections" (just as we differentiate between different types of @ref orxonox::Pickupable "Pickupables") we define a new identifyer called the @ref orxonox::PickupCollectionIdentifier "PickupCollectionIdentifier" which has pretty much the same properties as the @ref orxonox::PickupIdentifier "PickupIdentifier" but extende to @ref orxonox::PickupCollection "PickupCollections".53 54 52 A PickupCollection can be created in XML as follows: 55 53 @code … … 85 83 virtual bool isTarget(const PickupCarrier* carrier) const; //!< Get whether a given class, represented by the input Identifier, is a target of this PickupCollection. 86 84 87 virtual const PickupIdentifier* getPickupIdentifier(void) const; //!< Get the PickupIdentifier of this PickupCollection. 85 inline void setRepresentationName(const std::string& name) 86 { this->representationName_ = name; } 87 virtual const std::string& getRepresentationName() const 88 { return this->representationName_; } 88 89 89 90 bool addPickupable(CollectiblePickup* pickup); //!< Add the input Pickupable to list of Pickupables combined by this PickupCollection. … … 101 102 virtual bool createSpawner(void); //!< Facilitates the creation of a PickupSpawner upon dropping of the Pickupable. 102 103 103 PickupCollectionIdentifier* pickupCollectionIdentifier_; //!< The PickupCollectionIdentifier of this PickupCollection. Is used to distinguish different PickupCollections amongst themselves.104 105 104 private: 106 105 void changedUsedAction(void); //!< Helper method. … … 108 107 void pickupsChanged(void); //!< Helper method. 109 108 109 std::string representationName_; //!< The name of the associated PickupRepresentation. 110 110 std::list<CollectiblePickup*> pickups_; //!< The list of the pointers of all the Pickupables this PickupCollection consists of. They are weak pointers to facilitate testing, whether the pointers are still valid. 111 111
Note: See TracChangeset
for help on using the changeset viewer.