Changeset 6405 for code/branches/pickup2/src/orxonox/pickup
- Timestamp:
- Dec 23, 2009, 8:27:17 PM (15 years ago)
- Location:
- code/branches/pickup2/src/orxonox/pickup
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pickup2/src/orxonox/pickup/CMakeLists.txt
r5781 r6405 1 1 ADD_SOURCE_FILES(ORXONOX_SRC_FILES 2 2 BaseItem.cc 3 DroppedItem.cc4 3 EquipmentItem.cc 5 4 ModifierPickup.cc … … 7 6 PickupCollection.cc 8 7 PickupInventory.cc 9 PickupSpawner.cc10 8 UsableItem.cc 11 9 ) -
code/branches/pickup2/src/orxonox/pickup/PickupCollection.cc
r5781 r6405 52 52 53 53 /** 54 @brief 55 Add an item to the collection. 56 57 Only adds the item if there's a free slot for it. 58 59 @param item Item to add to the collection. 60 @return Returns whether the item has been added to the collection. 54 @brief 55 Add an item to the collection. 56 57 Only adds the item if there's a free slot for it. 58 59 @param item 60 Item to add to the collection. 61 @return 62 Returns whether the item has been added to the collection. 61 63 */ 62 64 bool PickupCollection::add(BaseItem* item) -
code/branches/pickup2/src/orxonox/pickup/PickupCollection.h
r5947 r6405 50 50 @author Daniel 'Huty' Haggenmueller 51 51 */ 52 class _OrxonoxExport PickupCollection 52 class _OrxonoxExport PickupCollection : public orxonox::OrxonoxClass 53 53 { 54 54 public: 55 //TODO: Should probably be derived from OrxonoxClass???56 55 PickupCollection(); 57 56 … … 65 64 void remove(BaseItem* item, bool removeAllOfType = false); //!< Remove an item from the collection. 66 65 67 //TODO: What's up with that?66 //TODO: Hmm... probably should stay... 68 67 void useItem(); //!< Use the first usable item. 69 68 void useItem(UsableItem* item); //!< Use a usable item. 70 71 //TODO: This really shouldn't be here. It's nbot the Collections business to know about stuff like that.72 void addAdditiveModifier(ModifierType::Value type, float value); //!< Add an additive modifier.73 void addMultiplicativeModifier(ModifierType::Value type, float value); //!< Add a multiplicative modifier.74 75 float getAdditiveModifier(ModifierType::Value type); //!< Get total additive modifier.76 float getMultiplicativeModifier(ModifierType::Value type); //!< Get total multiplicative modifier.77 78 void removeAdditiveModifier(ModifierType::Value type, float value); //!< Remove an additive modifier.79 void removeMultiplicativeModifier(ModifierType::Value type, float value); //!< Remove a multiplicative modifier.80 81 float processModifiers(ModifierType::Value type, float inputValue, bool addBeforeMultiplication = false); //!< Apply the modifiers to a float.82 Vector3 processModifiers(ModifierType::Value type, Vector3 inputValue, bool addBeforeMultiplication = false); //!< Apply the modifiers to a Vector3.83 84 /**85 @brief Get the map of contained items.86 @return The map of items.87 */88 std::multimap<std::string, BaseItem*> getItems() const89 { return this->items_; }90 69 91 70 /** … … 110 89 std::deque<PassiveItem*> getPassiveItems(); //!< Get a list of passive items. 111 90 std::deque<UsableItem*> getUsableItems(); //!< Get a list of usable items. 91 112 92 private: 113 Pawn* owner_; 93 Pawn* owner_; //!< The owner of the PickupCollection. 114 94 UsableItem* currentUsable_; 115 116 bool bBlockRemovals_; //!< Whether to block direct removals through remove(). 117 118 std::multimap<ModifierType::Value, float> additiveModifiers_; //!< Contains additive modifiers (indexed by ModifierType). 119 std::multimap<ModifierType::Value, float> multiplicativeModifiers_; //!< Contains multiplicative modifiers (indexed by ModifierType). 95 int slots_; 120 96 121 97 std::multimap<std::string, BaseItem*> items_; //!< Map of items in the collection (indexed by pickupIdentifier of the items).
Note: See TracChangeset
for help on using the changeset viewer.