Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 6, 2010, 8:00:40 AM (14 years ago)
Author:
dafrick
Message:

Pickups module is now (from what I can tell after some basic testing) fully functional over the network.
However it's still a little messy, needs some cleanup and documentation.
I introduced a new class, the PickupListener, which allows reacting to pickups becoming used, unused, picked up or dropped.

File:
1 edited

Legend:

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

    r7494 r7504  
    4444#include "Rewardable.h"
    4545
    46 namespace orxonox // tolua_export
    47 { // tolua_export
     46namespace orxonox
     47{
    4848
    4949    /**
     
    5858        Damian 'Mozork' Frick
    5959    */
    60     class _OrxonoxExport Pickupable  // tolua_export
    61         : virtual public OrxonoxClass, public Rewardable
    62     {  // tolua_export
     60    class _OrxonoxExport Pickupable : virtual public OrxonoxClass, public Rewardable
     61    {
    6362        protected:
    6463            Pickupable(); //!< Default constructor.
     
    7170            @return Returns true if the Pickupable is currently in use.
    7271            */
    73             inline bool isUsed(void) { return this->used_; }  // tolua_export
     72            inline bool isUsed(void)
     73                { return this->used_; }
    7474            /**
    7575            @brief  Should be called when the Pickupable has transited from used to unused or the other way around.
     
    9494            @return Returns true if the Pickupable is currently picked up, false if not.
    9595            */
    96             inline bool isPickedUp(void) { return this->pickedUp_; }  // tolua_export
     96            inline bool isPickedUp(void)
     97                { return this->pickedUp_; }
    9798            /**
    9899            @brief  Should be called when the Pickupable has transited from picked up to dropped or the other way around.
     
    105106            @return Returns true if it can be used.
    106107            */
    107             inline bool isUsable(void) { return this->enabled_; } // tolua_export
    108            
     108            inline bool isUsable(void)
     109                { return this->enabled_; }
     110
    109111            /**
    110112            @brief Returns whether the Pickupable can be unused.
    111113            @return Returns true if it can be unused.
    112114            */
    113             inline bool isUnusable(void) { return this->enabled_; } // tolua_export
     115            inline bool isUnusable(void)
     116                { return this->enabled_; }
    114117
    115118            /**
     
    190193            virtual bool reward(PlayerInfo* player); //!< Method to transcribe a Pickupable as a Rewardable to the player.
    191194
    192     };  // tolua_export
     195    };
    193196
    194197    //! SUPER functions.
     
    196199    SUPER_FUNCTION(12, Pickupable, changedCarrier, false);
    197200    SUPER_FUNCTION(13, Pickupable, changedPickedUp, false);
    198 }  // tolua_export
     201}
    199202
    200203#endif /* _Pickupable_H__ */
Note: See TracChangeset for help on using the changeset viewer.