Changeset 7163 for code/trunk/src/modules/pickup/items/MetaPickup.h
- Timestamp:
- Aug 11, 2010, 8:55:13 AM (15 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/modules/pickup/items/MetaPickup.h
r6709 r7163 48 48 none, 49 49 use, 50 drop 50 drop, 51 destroy, 52 destroyCarrier 51 53 }; 52 54 } 53 55 54 56 /** 55 57 @brief 56 The MetaPickup is a pickup that can, depending on the parameters, either drop all pickups of the PickupCarrier that picks it up, or use all the unused pickups of the PickupCarrier, that picks it up. The parameter to set for this is the metaType and it can be used with the values 'none', 'drop' and 'use'. 58 The MetaPickup is a pickup that can, depending on the parameter 'metaType', do different things. If the 'metaType' is set to 59 1) 'use', all the pickups, the PickupCarrier has, are immediately set to used upon pickup of the MetaPickup. 60 2) 'drop', all the pickups, the PickupCarrier has, are immediately dropped upon pickup of the MetaPickup. 61 3) 'destroy', all the pickups, the PickupCarrier has, are immediately destroyed upon pickup of the MetaPickup. 62 4) 'destroyCarrier', the PickupCarrier is immediately destroyed upon pickup of the MetaPickup. 57 63 @author 58 64 Damian 'Mozork' Frick … … 60 66 class _PickupExport MetaPickup : public Pickup 61 67 { 62 68 63 69 public: 64 70 MetaPickup(BaseObject* creator); //!< Constructor. Registers and initializes the object. 65 71 virtual ~MetaPickup(); //!< Destructor. 66 72 67 73 virtual void XMLPort(Element& xmlelement, orxonox::XMLPort::Mode mode); //!< Method for creating a MetaPickup object through XML. 68 74 69 75 virtual void changedUsed(void); //!< Is called when the pickup has transited from used to unused or the other way around. 70 76 virtual void clone(OrxonoxClass*& item); //!< Creates a duplicate of the input OrxonoxClass. 71 77 72 78 /** 73 79 @brief Returns the meta type of the MetaPickup. … … 77 83 { return this->metaType_; } 78 84 const std::string& getMetaType(void); //!< Get the meta type of this MetaPickup. 79 85 80 86 protected: 81 87 void initializeIdentifier(void); //!< Initializes the PickupIdentifier of this pickup. 82 88 83 89 /** 84 90 @brief Set the meta type of the MetaPickup. … … 88 94 { this->metaType_ = type; } 89 95 void setMetaType(const std::string& type); //!< Set the meta type of this MetaPickup. 90 96 91 97 private: 92 98 void initialize(void); //!< Initializes the member variables. 93 99 94 100 pickupMetaType::Value metaType_; //!< The meta type of the MetaPickup, determines which actions are taken. 95 101 96 102 //! Static strings for the meta types. 97 103 static const std::string metaTypeNone_s; 98 104 static const std::string metaTypeUse_s; 99 105 static const std::string metaTypeDrop_s; 100 101 106 static const std::string metaTypeDestroy_s; 107 static const std::string metaTypeDestroyCarrier_s; 108 109 102 110 }; 103 111
Note: See TracChangeset
for help on using the changeset viewer.