Changeset 6675 for code/branches/pickup4/src/modules
- Timestamp:
- Apr 2, 2010, 5:35:14 PM (15 years ago)
- Location:
- code/branches/pickup4/src/modules/pickup
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pickup4/src/modules/pickup/PickupManager.cc
r6669 r6675 127 127 } 128 128 129 unsignedint PickupManager::getNumCarrierChildren(PickupCarrier* carrier)129 int PickupManager::getNumCarrierChildren(PickupCarrier* carrier) 130 130 { 131 131 if(carrier == NULL) … … 134 134 } 135 135 136 PickupCarrier* PickupManager::getCarrierChild( unsignedint index, PickupCarrier* carrier)136 PickupCarrier* PickupManager::getCarrierChild(int index, PickupCarrier* carrier) 137 137 { 138 if(carrier == NULL) 139 return NULL; 138 140 return carrier->getCarrierChild(index); 139 141 } 140 142 141 PickupRepresentation* PickupManager::getPickupRepresentation(unsigned int index, PickupCarrier* carrier) 143 const std::string& PickupManager::getCarrierName(orxonox::PickupCarrier* carrier) 144 { 145 if(carrier == NULL) 146 return BLANKSTRING; 147 return carrier->getCarrierName(); 148 } 149 150 PickupRepresentation* PickupManager::getPickupRepresentation(int index, PickupCarrier* carrier) 142 151 { 143 152 Pickupable* pickup = carrier->getPickup(index); … … 149 158 150 159 151 unsignedint PickupManager::getNumPickups(PickupCarrier* carrier)160 int PickupManager::getNumPickups(PickupCarrier* carrier) 152 161 { 162 if(carrier == NULL) 163 return 0; 153 164 return carrier->getNumPickups(); 154 165 } 155 166 156 void PickupManager::dropPickup( unsignedint index, PickupCarrier* carrier)167 void PickupManager::dropPickup(int index, PickupCarrier* carrier) 157 168 { 158 169 Pickupable* pickup = carrier->getPickup(index); … … 160 171 } 161 172 162 void PickupManager::usePickup( unsignedint index, PickupCarrier* carrier, bool use)173 void PickupManager::usePickup(int index, PickupCarrier* carrier, bool use) 163 174 { 164 175 Pickupable* pickup = carrier->getPickup(index); -
code/branches/pickup4/src/modules/pickup/PickupManager.h
r6669 r6675 72 72 orxonox::PickupCarrier* getPawn(void); 73 73 74 unsignedint getNumCarrierChildren(orxonox::PickupCarrier* carrier);75 orxonox::PickupCarrier* getCarrierChild( unsignedint index, orxonox::PickupCarrier* carrier);74 int getNumCarrierChildren(orxonox::PickupCarrier* carrier); 75 orxonox::PickupCarrier* getCarrierChild(int index, orxonox::PickupCarrier* carrier); 76 76 77 unsigned int getNumPickups(orxonox::PickupCarrier* carrier); 78 PickupRepresentation* getPickupRepresentation(unsigned int index, orxonox::PickupCarrier* carrier); 79 void dropPickup(unsigned int index, orxonox::PickupCarrier* carrier); 80 void usePickup(unsigned int index, orxonox::PickupCarrier* carrier, bool use); 77 const std::string& getCarrierName(orxonox::PickupCarrier* carrier); 78 79 int getNumPickups(orxonox::PickupCarrier* carrier); 80 PickupRepresentation* getPickupRepresentation(int index, orxonox::PickupCarrier* carrier); 81 void dropPickup(int index, orxonox::PickupCarrier* carrier); 82 void usePickup(int index, orxonox::PickupCarrier* carrier, bool use); 81 83 // tolua_end 82 84 -
code/branches/pickup4/src/modules/pickup/PickupRepresentation.cc
r6632 r6675 86 86 this->name_ = "Pickup"; 87 87 this->spawnerTemplate_ = ""; 88 this->inventoryRepresentation_ = " ";88 this->inventoryRepresentation_ = "Default"; 89 89 this->pickup_ = NULL; 90 90 } … … 98 98 SUPER(PickupRepresentation, XMLPort, xmlelement, mode); 99 99 100 XMLPortParam(PickupRepresentation, " name", setName, getName, xmlelement, mode);101 XMLPortParam(PickupRepresentation, " description", setDescription, getDescription, xmlelement, mode);100 XMLPortParam(PickupRepresentation, "pickupName", setPickupName, getPickupName, xmlelement, mode); 101 XMLPortParam(PickupRepresentation, "pickupDescription", setPickupDescription, getPickupDescription, xmlelement, mode); 102 102 XMLPortParam(PickupRepresentation, "spawnerTemplate", setSpawnerTemplate, getSpawnerTemplate, xmlelement, mode); 103 103 XMLPortParam(PickupRepresentation, "inventoryRepresentation", setInventoryRepresentation, getInventoryRepresentation, xmlelement, mode); -
code/branches/pickup4/src/modules/pickup/PickupRepresentation.h
r6632 r6675 68 68 @param name The name. 69 69 */ 70 inline void set Name(const std::string& name)70 inline void setPickupName(const std::string& name) 71 71 { this->name_ = name; } 72 72 /** … … 74 74 @param description The Description. 75 75 */ 76 inline void set Description(const std::string& description)76 inline void setPickupDescription(const std::string& description) 77 77 { this->description_ = description; } 78 78 /** … … 107 107 @return Returns the name. 108 108 */ 109 inline const std::string& get Name(void) { return this->name_; } // tolua_export109 inline const std::string& getPickupName(void) { return this->name_; } // tolua_export 110 110 /** 111 111 @brief Get the description of the Pickupable represented by this PickupRepresentation. 112 112 @return Returns the description. 113 113 */ 114 inline const std::string& get Description(void) { return this->description_; } // tolua_export114 inline const std::string& getPickupDescription(void) { return this->description_; } // tolua_export 115 115 /** 116 116 @brief Get the name of spawnerTemplate the Pickupable represented by this PickupRepresentation.
Note: See TracChangeset
for help on using the changeset viewer.