Changeset 5902 for code/branches/pickup/src/orxonox/pickup/items/Jump.h
- Timestamp:
- Oct 7, 2009, 2:20:43 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pickup/src/orxonox/pickup/items/Jump.h
r5781 r5902 50 50 class _OrxonoxExport Jump : public UsableItem 51 51 { 52 public: 53 Jump(BaseObject* creator); //!< Constructor 54 virtual ~Jump(); //!< Deconstructor 52 public: 53 //TODO: Comment. a.s.o. 54 Jump(BaseObject* creator); //!< Constructor 55 virtual ~Jump(); //!< Deconstructor 55 56 56 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< XMLPort57 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< XMLPort 57 58 58 virtual int getMaxCarryAmount() const59 { return INT_MAX; }59 virtual int getMaxCarryAmount() const 60 { return INT_MAX; } 60 61 61 virtual void used(Pawn* pawn); //!< Called when the item is used.62 virtual void used(Pawn* pawn); //!< Called when the item is used. 62 63 63 virtual bool pickedUp(Pawn* pawn); //!< Called when the item is picked up.64 virtual bool dropped(Pawn* pawn); //!< Called when the item is dropped.64 virtual bool pickedUp(Pawn* pawn); //!< Called when the item is picked up. 65 virtual bool dropped(Pawn* pawn); //!< Called when the item is dropped. 65 66 66 /**67 @brief Get the velocity added when the item is used.68 @return Returns the added velocity (relative to the Pawn).69 */70 inline const Vector3& getVelocity() const71 { return this->velocity_; }72 /**73 @brief Set the velocity added when the item is used.74 @param velocity New added velocity (relative to Pawn).75 */76 inline void setVelocity(const Vector3& velocity)77 { this->velocity_ = velocity; }78 /**79 @brief Get the amount of jumps available.80 @return Returns how many times the item can be used.81 */82 inline int getJumpsAvailable() const83 { return this->jumpsAvailable_; }84 /**85 @brief Set the amount of jumps available.86 @param num New number of available jumps.87 */88 inline void setJumpsAvailable(int num)89 { this->jumpsAvailable_ = num; }90 private:91 Vector3 velocity_; //!< The velocity added when the item is used.92 int jumpsAvailable_; //!< Amount of jumps still available.67 /** 68 @brief Get the velocity added when the item is used. 69 @return Returns the added velocity (relative to the Pawn). 70 */ 71 inline const Vector3& getVelocity() const 72 { return this->velocity_; } 73 /** 74 @brief Set the velocity added when the item is used. 75 @param velocity New added velocity (relative to Pawn). 76 */ 77 inline void setVelocity(const Vector3& velocity) 78 { this->velocity_ = velocity; } 79 /** 80 @brief Get the amount of jumps available. 81 @return Returns how many times the item can be used. 82 */ 83 inline int getJumpsAvailable() const 84 { return this->jumpsAvailable_; } 85 /** 86 @brief Set the amount of jumps available. 87 @param num New number of available jumps. 88 */ 89 inline void setJumpsAvailable(int num) 90 { this->jumpsAvailable_ = num; } 91 private: 92 Vector3 velocity_; //!< The velocity added when the item is used. 93 int jumpsAvailable_; //!< Amount of jumps still available. 93 94 }; 94 95 }
Note: See TracChangeset
for help on using the changeset viewer.