Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 29, 2010, 12:30:32 PM (14 years ago)
Author:
dafrick
Message:

Working towards a functioning PickupInventory.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/pickup4/src/modules/pickup/PickupManager.h

    r6540 r6632  
    4444#include "core/OrxonoxClass.h"
    4545
    46 namespace orxonox
    47 {
     46namespace orxonox // tolua_export
     47{ // tolua_export
     48
     49    //TODO: Remove after transfer to orxonox/pickup
     50    class PickupCarrier; // tolua_export
    4851
    4952    /**
    5053    @brief
    5154        Manages Pickupables.
    52         In essence has two tasks to fulfill. Firstly it must link Pickupables (through their PickupIdentifiers) and their PickupRepresentations. Secondly it manages the Pickup GUI.
     55        In essence has two tasks to fulfill. Firstly it must link Pickupables (through their PickupIdentifiers) and their PickupRepresentations. Secondly it manages the PickupInventory.
    5356        //TODO: Manage Pickup GUI.
    5457    @author
    5558        Damian 'Mozork' Frick
    5659    */
    57     class _PickupExport PickupManager : public Singleton<PickupManager>, public OrxonoxClass
    58     {
     60    class _PickupExport PickupManager // tolua_export
     61        : public Singleton<PickupManager>, public OrxonoxClass
     62    { // tolua_export
    5963        friend class Singleton<PickupManager>;
    6064       
     
    6367            virtual ~PickupManager();
    6468           
    65             static PickupManager& getInstance() { return Singleton<PickupManager>::getInstance(); }
     69            static PickupManager& getInstance() { return Singleton<PickupManager>::getInstance(); } // tolua_export
    6670           
    6771            bool registerRepresentation(const PickupIdentifier* identifier, PickupRepresentation* representation); //!< Registers a PickupRepresentation together with the PickupIdentifier of the Pickupable the PickupRepresentation represents.
    6872            PickupRepresentation* getRepresentation(const PickupIdentifier* identifier); //!< Get the PickupRepresentation representing the Pickupable with the input PickupIdentifier.
    6973           
     74            // tolua_begin
     75            PickupCarrier* getPawn(void);
     76           
     77            unsigned int getNumCarrierChildren(PickupCarrier* carrier);
     78            PickupCarrier* getCarrierChild(unsigned int index, PickupCarrier* carrier);
     79           
     80            unsigned int getNumPickups(PickupCarrier* carrier);
     81            PickupRepresentation* getPickupRepresentation(unsigned int index, PickupCarrier* carrier);
     82            void dropPickup(unsigned int index, PickupCarrier* carrier);
     83            void usePickup(unsigned int index, PickupCarrier* carrier, bool use);
     84            // tolua_end
     85           
    7086        private:
    7187            static PickupManager* singletonPtr_s;
     88            static const std::string guiName_s;
    7289           
    7390            PickupRepresentation* defaultRepresentation_; //!< The default PickupRepresentation.
    7491            std::map<const PickupIdentifier*, PickupRepresentation*, PickupIdentifierCompare> representations_; //!< Map linking PickupIdentifiers (representing types if Pickupables) and PickupRepresentations.
    7592       
    76     };
     93    }; // tolua_export
    7794   
    78 }
     95} // tolua_export
    7996
    8097#endif // _PickupManager_H__
Note: See TracChangeset for help on using the changeset viewer.