Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 15, 2010, 2:47:39 PM (15 years ago)
Author:
dafrick
Message:

PickupCollection is broken for now because to make it work drastic changes would have to be made. I wil fix it at a later date, though.

Location:
code/trunk/src/orxonox/interfaces
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/interfaces/Pickupable.cc

    r6725 r6731  
    104104    bool Pickupable::isTarget(const PickupCarrier* carrier) const
    105105    {
     106        if(carrier == NULL)
     107            return false;
    106108        return this->isTarget(carrier->getIdentifier());
    107109    }
     
    109111    /**
    110112    @brief
    111         Get whether a given class, represented by the input Identifier, is a target of this Pickupable.
    112     @param target
    113         The Identifier of which it has to be determinde whether it is a target of this Pickupable.
    114     @return
    115         Returns true if the given Identifier is a target.
    116     */
    117     bool Pickupable::isTarget(Identifier* target) const
     113        Get whether the given Identififer is a target of this Pickupable.
     114    @param identifier
     115        The PickupCarrier of which it has to be determinde whether it is a target of this Pickupable.
     116    @return
     117        Returns true if the given PickupCarrier is a target.
     118    */
     119    bool Pickupable::isTarget(const Identifier* identifier) const
    118120    {
    119121        //! Iterate through all targets of this Pickupable.
    120122        for(std::list<Identifier*>::const_iterator it = this->targets_.begin(); it != this->targets_.end(); it++)
    121123        {
    122             if(target->isA(*it))
     124            if(identifier->isA(*it))
    123125                return true;
    124126        }
  • code/trunk/src/orxonox/interfaces/Pickupable.h

    r6540 r6731  
    9898            bool dropped(void); //!< Sets the Pickupable to not picked up or dropped.
    9999           
    100             bool isTarget(const PickupCarrier* carrier) const; //!< Get whether the given PickupCarrier is a target of this pickup.
    101             virtual bool isTarget(Identifier* identifier) const; //!< Get whether a given class, represented by the input Identifier, is a target of this Pickupable.
     100            virtual bool isTarget(const PickupCarrier* carrier) const; //!< Get whether the given PickupCarrier is a target of this pickup.
     101            bool isTarget(const Identifier* identifier) const; //!< Get whether a given class, represented by the input Identifier, is a target of this Pickupable.
    102102            bool addTarget(PickupCarrier* target); //!< Add a PickupCarrier as target of this pickup.
    103103            bool addTarget(Identifier* identifier); //!< Add a class, representetd by the input Identifier, as target of this pickup.
Note: See TracChangeset for help on using the changeset viewer.