Changeset 6632 for code/branches/pickup4/src/modules/pickup/PickupManager.h
- Timestamp:
- Mar 29, 2010, 12:30:32 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pickup4/src/modules/pickup/PickupManager.h
r6540 r6632 44 44 #include "core/OrxonoxClass.h" 45 45 46 namespace orxonox 47 { 46 namespace orxonox // tolua_export 47 { // tolua_export 48 49 //TODO: Remove after transfer to orxonox/pickup 50 class PickupCarrier; // tolua_export 48 51 49 52 /** 50 53 @brief 51 54 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. 53 56 //TODO: Manage Pickup GUI. 54 57 @author 55 58 Damian 'Mozork' Frick 56 59 */ 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 59 63 friend class Singleton<PickupManager>; 60 64 … … 63 67 virtual ~PickupManager(); 64 68 65 static PickupManager& getInstance() { return Singleton<PickupManager>::getInstance(); } 69 static PickupManager& getInstance() { return Singleton<PickupManager>::getInstance(); } // tolua_export 66 70 67 71 bool registerRepresentation(const PickupIdentifier* identifier, PickupRepresentation* representation); //!< Registers a PickupRepresentation together with the PickupIdentifier of the Pickupable the PickupRepresentation represents. 68 72 PickupRepresentation* getRepresentation(const PickupIdentifier* identifier); //!< Get the PickupRepresentation representing the Pickupable with the input PickupIdentifier. 69 73 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 70 86 private: 71 87 static PickupManager* singletonPtr_s; 88 static const std::string guiName_s; 72 89 73 90 PickupRepresentation* defaultRepresentation_; //!< The default PickupRepresentation. 74 91 std::map<const PickupIdentifier*, PickupRepresentation*, PickupIdentifierCompare> representations_; //!< Map linking PickupIdentifiers (representing types if Pickupables) and PickupRepresentations. 75 92 76 }; 93 }; // tolua_export 77 94 78 } 95 } // tolua_export 79 96 80 97 #endif // _PickupManager_H__
Note: See TracChangeset
for help on using the changeset viewer.