Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 7, 2009, 2:20:43 PM (15 years ago)
Author:
dafrick
Message:

Added comments and a lot of TODO's, many of which probably are obsolete by now, so don't mind them, they're just to help me remember, what I thought at the time I went through that particular code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/pickup/src/orxonox/pickup/items/Jump.h

    r5781 r5902  
    5050    class _OrxonoxExport Jump : public UsableItem
    5151    {
    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
    5556
    56         virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);  //!< XMLPort
     57            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);  //!< XMLPort
    5758
    58         virtual int getMaxCarryAmount() const
    59             { return INT_MAX; }
     59            virtual int getMaxCarryAmount() const
     60                { return INT_MAX; }
    6061
    61         virtual void used(Pawn* pawn);          //!< Called when the item is used.
     62            virtual void used(Pawn* pawn);          //!< Called when the item is used.
    6263
    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.
    6566
    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() const
    71             { 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() const
    83             { 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.
    9394    };
    9495}
Note: See TracChangeset for help on using the changeset viewer.