- Timestamp:
- Mar 13, 2010, 3:32:34 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pickup3/src/modules/pickup/PickupCollection.cc
r6497 r6519 45 45 { 46 46 47 CreateFactory(PickupCollection); 48 47 49 /** 48 50 @brief … … 77 79 SUPER(PickupCollection, XMLPort, xmlelement, mode); 78 80 79 //TODO: Does this work? Problem could be, that Pickupable itself cannot be instantiated through XML, doubt that, though. 80 XMLPortObject(PickupCollection, PickupCollection, "pickupables", addPickupable, getPickupable, xmlelement, mode); 81 XMLPortObject(PickupCollection, Pickupable, "pickupables", addPickupable, getPickupable, xmlelement, mode); 81 82 82 83 this->initializeIdentifier(); … … 103 104 bool PickupCollection::createSpawner(const Vector3& position) 104 105 { 105 DroppedPickup::DroppedPickup(this, this, position);106 new DroppedPickup(this, this, position); 106 107 return true; 107 108 } … … 178 179 } 179 180 181 bool PickupCollection::isTarget(Identifier* identifier) const 182 { 183 for(std::vector<Pickupable*>::const_iterator it = this->pickups_.begin(); it != this->pickups_.end(); it++) 184 { 185 if(!(*it)->isTarget(identifier)) 186 return false; 187 } 188 189 return true; 190 } 191 180 192 const PickupIdentifier* PickupCollection::getPickupIdentifier(void) 181 193 {
Note: See TracChangeset
for help on using the changeset viewer.