Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 30, 2012, 11:08:17 PM (12 years ago)
Author:
landauf
Message:

merged branch presentation2012merge back to trunk

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/modules/pickup/Pickup.h

    r8108 r9348  
    105105            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    106106
     107            virtual const std::string& getRepresentationName() const
     108                { return this->representationName_; }
     109
    107110            /**
    108111            @brief Get the activation type of the Pickup.
    109112            @return Returns the activation type of the Pickup.
    110113            */
    111             inline pickupActivationType::Value getActivationTypeDirect(void) const
     114            inline pickupActivationType::Value getActivationType(void) const
    112115                { return this->activationType_; }
    113116            /**
     
    115118            @return Returns the duration type of the Pickup.
    116119            */
    117             inline pickupDurationType::Value getDurationTypeDirect(void) const
     120            inline pickupDurationType::Value getDurationType(void) const
    118121                { return this->durationType_; }
    119122
    120             const std::string& getActivationType(void) const; //!< Get the activation type of the Pickup.
    121             const std::string& getDurationType(void) const; //!< Get the duration type of the Pickup.
     123            const std::string& getActivationTypeAsString(void) const; //!< Get the activation type of the Pickup.
     124            const std::string& getDurationTypeAsString(void) const; //!< Get the duration type of the Pickup.
    122125
    123126            /**
     
    126129            */
    127130            inline bool isImmediate(void) const
    128                 { return this->getActivationTypeDirect() == pickupActivationType::immediate; }
     131                { return this->getActivationType() == pickupActivationType::immediate; }
    129132            /**
    130133            @brief Get whether the activation type is 'onUse'.
     
    132135            */
    133136            inline bool isOnUse(void) const
    134                 { return this->getActivationTypeDirect() == pickupActivationType::onUse; }
     137                { return this->getActivationType() == pickupActivationType::onUse; }
    135138            /**
    136139            @brief Get whether the duration type is 'once'.
     
    138141            */
    139142            inline bool isOnce(void) const
    140                 { return this->getDurationTypeDirect() == pickupDurationType::once; }
     143                { return this->getDurationType() == pickupDurationType::once; }
    141144            /**
    142145            @brief Get whether the duration type is 'continuous'.
     
    144147            */
    145148            inline bool isContinuous(void) const
    146                 { return this->getDurationTypeDirect() == pickupDurationType::continuous; }
     149                { return this->getDurationType() == pickupDurationType::continuous; }
    147150
    148151            virtual void changedPickedUp(void); //!< Should be called when the pickup has transited from picked up to dropped or the other way around.
    149             virtual void clone(OrxonoxClass*& item); //!< Creates a duplicate of the OrxonoxClass.
    150152
    151153        protected:
    152             void initializeIdentifier(void);
     154            virtual bool createSpawner(void); //!< Facilitates the creation of a PickupSpawner upon dropping of the Pickupable.
    153155
    154             virtual bool createSpawner(void); //!< Facilitates the creation of a PickupSpawner upon dropping of the Pickupable.
     156            /**
     157            @brief Sets the representation name which refers to the name of the PickupRepresentation that is used to represent this pickup.
     158            */
     159            inline void setRepresentationName(const std::string& name)
     160                { this->representationName_ = name; }
    155161
    156162            /**
     
    158164            @param type The activation type of the Pickup.
    159165            */
    160             inline void setActivationTypeDirect(pickupActivationType::Value type)
     166            inline void setActivationType(pickupActivationType::Value type)
    161167                { this->activationType_ = type; }
    162168            /**
     
    164170            @param type The duration type of the Pickup.
    165171            */
    166             inline void setDurationTypeDirect(pickupDurationType::Value type)
     172            inline void setDurationType(pickupDurationType::Value type)
    167173                { this->durationType_ = type; }
    168174
    169             void setActivationType(const std::string& type); //!< Set the activation type of the Pickup.
    170             void setDurationType(const std::string& type); //!< Set the duration type of the Pickup.
     175            void setActivationTypeAsString(const std::string& type); //!< Set the activation type of the Pickup.
     176            void setDurationTypeAsString(const std::string& type); //!< Set the duration type of the Pickup.
    171177
    172178        private:
    173179            void initialize(void); //!< Initializes the member variables.
    174180
     181            std::string representationName_; //!< The name of the associated PickupRepresentation.
    175182            pickupActivationType::Value activationType_; //!< The activation type of the Pickup.
    176183            pickupDurationType::Value durationType_; //!< The duration type of the Pickup.
Note: See TracChangeset for help on using the changeset viewer.