Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 23, 2009, 8:27:17 PM (14 years ago)
Author:
dafrick
Message:

Commit changes in pickup before merge.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/pickup2/src/orxonox/pickup/PickupCollection.h

    r5947 r6405  
    5050    @author Daniel 'Huty' Haggenmueller
    5151    */
    52     class _OrxonoxExport PickupCollection
     52    class _OrxonoxExport PickupCollection : public orxonox::OrxonoxClass
    5353    {
    5454        public:
    55             //TODO: Should probably be derived from OrxonoxClass???
    5655            PickupCollection();
    5756
     
    6564            void remove(BaseItem* item, bool removeAllOfType = false);                  //!< Remove an item from the collection.
    6665
    67             //TODO: What's up with that?
     66            //TODO: Hmm... probably should stay...
    6867            void useItem();                                                             //!< Use the first usable item.
    6968            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() const
    89                 { return this->items_; }
    9069
    9170            /**
     
    11089            std::deque<PassiveItem*> getPassiveItems();     //!< Get a list of passive items.
    11190            std::deque<UsableItem*> getUsableItems();      //!< Get a list of usable items.
     91
    11292        private:
    113             Pawn* owner_;           //!< The owner of the PickupCollection.
     93            Pawn* owner_; //!< The owner of the PickupCollection.
    11494            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_;
    12096
    12197            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.