Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 7, 2010, 2:05:05 PM (15 years ago)
Author:
dafrick
Message:

Simplification in creation of PickupIdentifier.

Location:
code/branches/pickup3/src/modules/pickup
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • code/branches/pickup3/src/modules/pickup/Pickup.cc

    r6477 r6480  
    7272    */
    7373    void Pickup::initializeIdentifier(void)
    74     {
    75         //TODO: Check whether this could not be done in the Constructor if Pickupable. Would be much more convenient.
    76         this->pickupIdentifier_->addClass(this->getIdentifier());
    77        
     74    {       
    7875        //TODO: Works?
    7976        std::string val1 = this->getActivationType();
  • code/branches/pickup3/src/modules/pickup/PickupCollection.cc

    r6475 r6480  
    5353        RegisterObject(PickupCollection);
    5454       
    55         this->pickupCollectionIdentifier_ = new PickupCollectionIdentifier();
     55        this->pickupCollectionIdentifier_ = new PickupCollectionIdentifier(this);
    5656    }
    5757   
     
    8585    void PickupCollection::initializeIdentifier(void)
    8686    {
    87         this->pickupCollectionIdentifier_->addClass(this->getIdentifier());
    88        
    8987        for(std::vector<Pickupable*>::iterator it = this->pickups_.begin(); it != this->pickups_.end(); it++)
    9088        {
  • code/branches/pickup3/src/modules/pickup/PickupCollectionIdentifier.cc

    r6475 r6480  
    3434{
    3535   
    36     PickupCollectionIdentifier::PickupCollectionIdentifier(void)
     36    PickupCollectionIdentifier::PickupCollectionIdentifier(Pickupable* pickup) : PickupIdentifier(pickup)
    3737    {
    3838        RegisterObject(PickupCollectionIdentifier);
  • code/branches/pickup3/src/modules/pickup/PickupCollectionIdentifier.h

    r6475 r6480  
    4242       
    4343        public:
    44             PickupCollectionIdentifier(void);
     44            PickupCollectionIdentifier(Pickupable* pickup);
    4545            ~PickupCollectionIdentifier();
    4646           
  • code/branches/pickup3/src/modules/pickup/items/HealthPickup.cc

    r6478 r6480  
    8888    void HealthPickup::initializeIdentifier(void)
    8989    {
    90         this->pickupIdentifier_->addClass(this->getIdentifier());
    91        
    9290        std::stringstream stream;
    9391        stream << this->getHealth();
Note: See TracChangeset for help on using the changeset viewer.